• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
ExtAudioFileWriteAsync problem,empty file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: ExtAudioFileWriteAsync problem,empty file
      • From: William Stewart <email@hidden>
  • Prev by Date: Examples on how to use stereo mixer?
  • Next by Date: Re: Coreaudio-api Digest, Vol 4, Issue 207
  • Previous by thread: Re: Examples on how to use stereo mixer?
  • Next by thread: Re: ExtAudioFileWriteAsync problem,empty file
  • Index(es):
    • Date
    • Thread