AudioBuffer question
AudioBuffer question
- Subject: AudioBuffer question
- From: Jeff LaMarche <email@hidden>
- Date: Wed, 18 Jun 2008 10:53:50 -0400
I've got a large buffer of data (a void *) that I've captured from the selected input device (it is unmodified no AUs applied, just raw data from the HAL), and I now want to write this out to a file using ExtAudioFileWriteAsync. I worked through my problems opening the file and setting the client format, and now am ready to actually write the data to the file. In order to do that, it appears that I have to get the data back into an audio buffer list, so I've tried this:
int numFrames = bufferSize / inFormat.mBytesPerFrame; AudioBufferList outBufferList; AudioBuffer outBuffer[1]; outBuffer[0].mNumberChannels = 1; outBuffer[0].mDataByteSize = bufferSize; outBuffer[0].mData = soundBuffer; outBufferList.mNumberBuffers = 1; outBufferList.mBuffers = outBuffer; <----- THIS LINE ERRORS OUT
err = ExtAudioFileWriteAsync(outputFile, numFrames, &outBufferList);
I get an incompatible types in assignment error when I try to assign outBuffer to outBufferList.mBuffers, even though both are AudioBuffer arrays. Does anyone know why I can't make this assignment and/or am I going about this the wrong way?
Thanks, Jeff |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden