• 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
AudioQueue can record to .caf but not .aif on iPhone?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AudioQueue can record to .caf but not .aif on iPhone?


  • Subject: AudioQueue can record to .caf but not .aif on iPhone?
  • From: Chris Adamson <email@hidden>
  • Date: Thu, 5 Feb 2009 14:07:23 -0500

I was banging my head against a problem with a Audio Queue Services recorder until I noticed that while the programming guide uses AIFFs, the SpeakHere example uses CAF files.  Switching to CAF got my example working.

But that got me wondering, so I changed SpeakHere to try to use AIFF instead of CAF.  Specifically, I changed the URL references from "Recording.caf" to "Recording.aif", as well as changing the type in the audio file, as seen here (with a debug line to check and print the return value):

if (!self.audioFileID) {
// create the audio file
int myErr = 
AudioFileCreateWithURL (
audioFileURL,
//kAudioFileCAFType,
kAudioFileAIFFType,
&audioFormat,
kAudioFileFlags_EraseFile,
&audioFileID
);
NSLog (@"AudioFileCreateWithURL = %d", myErr);
}

Sure enough, when I run it and try to record, I get

2/5/09 1:49:23 PM SpeakHere[17707] AudioFileCreateWithURL = 1718449215"

which is the "fmt?" (kAudioFormatUnsupportedDataFormatError) status code.

Should I just assume that recording PCM to AIFF doesn't work on iPhone?  Not that I mind CAF, I just want to know.

Thanks.

--Chris

 _______________________________________________
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: AudioQueue can record to .caf but not .aif on iPhone?
      • From: William Stewart <email@hidden>
    • Re: AudioQueue can record to .caf but not .aif on iPhone?
      • From: Mark Kieling <email@hidden>
  • Prev by Date: 5.1 Surround-to-stereo AU
  • Next by Date: Re: AudioQueue can record to .caf but not .aif on iPhone?
  • Previous by thread: Re: 5.1 Surround-to-stereo AU
  • Next by thread: Re: AudioQueue can record to .caf but not .aif on iPhone?
  • Index(es):
    • Date
    • Thread