• 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
Re: Recording in .wav format doesn't work properly
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Recording in .wav format doesn't work properly


  • Subject: Re: Recording in .wav format doesn't work properly
  • From: tahome izwah <email@hidden>
  • Date: Fri, 30 Oct 2009 19:29:17 +0100

Did you try AudioFileOptimize() on that file? That will likely flush
the data to disk. This should automatically be done on closing the
file but maybe you're not closing it?

HTH
--th


2009/10/29 Zhiye (Sterling) Li <email@hidden>:
> Sorry I accidentally sent the last email while I didn't finish yet.
>
> so, the recording part of the code is like:
>
>     audioFormat.mSampleRate            = 44100.0;
>     audioFormat.mFormatID                 = kAudioFormatLinearPCM;
>     audioFormat.mFormatFlags            = kAudioFormatFlagIsSignedInteger |
> kAudioFormatFlagIsPacked;
>     audioFormat.mBytesPerPacket        = 2;
>     audioFormat.mFramesPerPacket    = 1;
>     audioFormat.mBytesPerFrame        = 2;
>     audioFormat.mChannelsPerFrame    = 1;
>     audioFormat.mBitsPerChannel        = 16;
>
>     status = AudioFileCreateWithURL(fileURL, kAudioFileWAVEType,
> &audioFormat, kAudioFileFlags_EraseFile, &audioFileID);
>     status = ExtAudioFileWrapAudioFileID(audioFileID, YES, &audiofile);
>
> ExtAudioFileSetProperty(audiofile,kExtAudioFileProperty_ClientDataFormat,sizeof(audioFormat),&audioFormat);
>     status = ExtAudioFileWriteAsync(audiofile, 0,NULL);
>
> And in the recording callback:
>
>     status =
> ExtAudioFileWriteAsync(THIS.audiofile,inNumberFrames,THIS.bufferList);
>
> Since "status" doesn't return error anywhere, I cannot find where is wrong,
> but the recorded .wav file cannot even be opened by iTunes...
>
>
>
> Zhiye
>
 _______________________________________________
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

References: 
 >Recording in .wav format doesn't work properly (From: "Zhiye (Sterling) Li" <email@hidden>)
 >Re: Recording in .wav format doesn't work properly (From: Seth Delackner <email@hidden>)
 >Re: Recording in .wav format doesn't work properly (From: "Zhiye (Sterling) Li" <email@hidden>)
 >Re: Recording in .wav format doesn't work properly (From: "Zhiye (Sterling) Li" <email@hidden>)

  • Prev by Date: Re: synchronization of input and output
  • Next by Date: Re: Recording in .wav format doesn't work properly
  • Previous by thread: Re: Recording in .wav format doesn't work properly
  • Next by thread: synchronization of input and output
  • Index(es):
    • Date
    • Thread