playback wav buffer on Mac.

J

Jerry

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_SIZE*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_SIZE,&hdrlen);
sndnewchannel(&ch,false);
sndplay(ch,false);
disposechannel(ch,false);
disposehandle((handle)header);
i++;
}
 
G

Grumble

Jerry said:
_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>
 
K

Keith Thompson

Jerry said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top