Using NSMutableData for an audio buffer?
Using NSMutableData for an audio buffer?
- Subject: Using NSMutableData for an audio buffer?
- From: Christopher Corbell <email@hidden>
- Date: Wed, 28 Jan 2004 02:40:00 -0800
I'm wondering about the safety of using an NSMutableData object for
an audio buffer in CoreAudio calls, esp. the AudioConverter callback
for AudioConverterFillComplexBuffer().
Right now my code is grabbing non-interleaved Float32 data from
an AudioUnit render notification. The data goes into two ring buffers
and the capturing thread just appends it into two NSMutableData
objects.
After capture is complete I'm trying to convert it to an AIFF file.
In this situation, when the NSMutableData objects won't be changed,
is it safe to use [theData bytes] + currentOffset when setting
the AudioBuffer mData field for the converter callback? I'm
guessing the callback will just do a copy of these bytes and
not modify the buffer in any way so it should be OK. However
while the conversion works I'm also seeing instability and
wondering if this could be a cause.
Thanks for any help,
Chris
_______________________________________________
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.