473,385 Members | 1,275 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

playback wav buffer on Mac.

HI,friends:
_I am sorry that my topic may be not supposed here,but,I like here and
just know few places in all groups._

I want to playback wave buffer on mac. in realtime.
so,I divide the buffer of a wave data into small parts for playback.

the problem is:
when I define PCM_FRAME_SIZE as the value 4096 or 4096 mutiplied by an
int.the playback routine "play" the wave buffer and I can hear the
sound.
but when other values were assigned to PCM_FRAME_SIZE,for example,
#define PCM_BUFFER_SIZE 400 //as below
the routine will be terminated by the system with signal 10,or
signal11.

Q:___Are there any contrains on Mac. of sound manager(concerned with
buffer)?___
---------------------------------------------------
p-codes for ref.
----------------------------------------------------
#define PCM_FRAME_SIZE 400
int i=0;
while(i not over buffer){
channelptr ch=nil;
sndlisthandle header;
memcpy(desBuf+PCM_FRAME_SIZE*i,srcBuf+PCM_FRAME_SI ZE*i,sizeof
(char)*PCM_FRAME_SIZE);
//it's confirmed that srcBuf contains the real wav data,
//I got it using debuger.
setupsndheader(header...,...,...,...,PCM_FRAME_SIZ E,&hdrlen);
sndnewchannel(&ch,false);
sndplay(ch,false);
disposechannel(ch,false);
disposehandle((handle)header);
i++;
}

Nov 14 '05 #1
2 1784
Jerry wrote:
_I am sorry that my topic may be not supposed here, but I like here
and just know few places in all groups._


Just when you thought September had finally ended... Damn you Google!

<sigh>
Nov 14 '05 #2
"Jerry" <zi****@gmail.com> writes:
[...]
Q:___Are there any contrains on Mac. of sound manager(concerned with
buffer)?___


We have no idea. There are a number of comp.sys.mac.* newsgroups; try
one of them.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Nov 14 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Todd Nirenstein | last post by:
does anyone know if you can kick off a .wav file and start some amount of time into the file. For example. kick off example.wave and start 1 minute and 13 seconds in the the audio playback? ...
2
by: Jacob | last post by:
I'm desperately in need of some direction here... I'm trying to write some software that would play back a series of images as a movie. I'm fairly new to C and I can't seem to find any resources...
1
by: Brett Hofer | last post by:
Does anyone know of a good component for audio(.WAV) playback that supports double-speed/normal/half-speed? I need to provide this control in an .aspx page and control it using C#. I have tried...
5
by: SaherAlim | last post by:
Hi, How can I record line-in and playback music simutaniously. Basically I want to merge two sounds. One comming from mic and the other is the played music from PC. i can access line-in (mic)...
1
by: Paolo | last post by:
Hi all! I'm new to Linux but I have a complex task (at least it seems so to me!): I created a small multicast protocol in C++ and now I need an application for testing. I have to create an...
2
by: hzgt9b | last post by:
Using VS2003, VB.NET, BACKGROUND I have a window forms based application that will be distributed and executed directly from CD media. The app contains a TreeView control and a WebBroswer...
0
by: dugfresh36 | last post by:
I am trying to control the playback of a tutorial I am building in Flash 8 Basic. I want the user to be able to go through the tutorial in two ways: 1) by manually clicking forward and back buttons;...
0
by: krudonix | last post by:
Hey i've developed a call logging system that records to mono a-law wav files. now i want to add a feature to playback the audio as its being recorded an event fires when i recieve audio...
0
by: Hillbilly | last post by:
I haven't started to research this yet. I have to assume others who have lots of experience have some comments they could make here about developing a PowerPoint slide show playback server to...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.