Changing size of output AudioBuffer to be used in IOProcess - newbie
Changing size of output AudioBuffer to be used in IOProcess - newbie
- Subject: Changing size of output AudioBuffer to be used in IOProcess - newbie
- From: <email@hidden>
- Date: Fri, 14 Feb 2003 07:47:40 -0700 (MST)
I am fairly new to core audio and I am having some problems with a few
concepts.
I am currently trying to write a simple program in java. The program is
reading in a file, processing the data, and then outputing to multiple
channels (at least 4 i am hoping). I originally started by looking at the
audioConverter's fillbuffer to do the work for me, but this doesn't allow
real-time access to the data which I need. So I have begun to write the
audioDeviceIOProc.execute method myself, and this is where my problems
begin.
1. The audioDeviceIOProc.execute method takes in an AudioBufferList
outOutputData as an input parameter. My understanding of this is that I
should be able to change the size of the AudioBuffers inside this list
according to how I set the AudioDevice (using
kAudioDevicePropertyBufferFrameSize and kAudioDevicePropertyBufferSize).
However no matter what I change these properties to, the output AudioBuffer
size is always 12! Am I missing something here?
2. Also if i leave the size at 12, it only runs through a couple of times
and then crashes with a SIGBUS (10). It is not a consistent crash though.
It is happening at different times in the IOProc code, and on different
runs through. But (here comes the good part) if i divide this by 4 for
example, then it runs through just fine, but with no sound coming out.
Alternatively if I make the size to copy larger than 12 (like 2048 which is
more reasonable i think) then it will run through to the end of the file,
printing out an error each IO cycle telling me the CAMemoryObject i am
trying to copy to is too small. The too small part makes perfect sense, but
why on earth it seems to only crash at 12 is a mystery.
If anyone can offer any advice I would be grateful.
Thanks
Melissa
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.