ExtAudioFileWriteAsync problem,empty file
ExtAudioFileWriteAsync problem,empty file
- Subject: ExtAudioFileWriteAsync problem,empty file
- From: sheen mac <email@hidden>
- Date: Fri, 3 Aug 2007 09:15:44 -0700 (PDT)
Hi All,
I tried to record data with in fixed interval using a NSTimer .At the
interval time I fetch the value from the ringbuffer and convert it into
desired format.After that I record it into file.But after the file disposal,
the file size was zero.I attached the code here.I used the same
client data format and file format of the recordAudioToFile code.
Kindly help me.
Thanks In Advance,
Sheen
- (void)audioRecordTimer
{
AudioBufferList *outBuffer = NULL;
OSStatus err = noErr;
outBuffer = objRecorder->RenderToBuffer(&err);
bcopy(outBuffer->mBuffers[0].mData,fAudioIPBuffer->mBuffers[0].mData,1000);
UInt32 numPackets = fAudioOPBuffer->mBuffers[0].mDataByteSize / fOutputFormat.mBytesPerPacket;
err = AudioConverterFillComplexBuffer(fConverter,ReConverterProc,self,
&numPackets,fAudioOPBuffer, NULL);
if(err != noErr)
fprintf(stderr, "AudioConverterFillComplexBuffer FAILED! ");
err = ExtAudioFileWriteAsync(fOutputAudioFile,numPackets,fAudioOPBuffer);
if(err != noErr)
fprintf(stderr, "ExtAudioFileWriteAsync FAILED! '%-4.4s'\n", formatID);
}
Ready for the edge of your seat?
Check out tonight's top picks on Yahoo! TV.
_______________________________________________
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