• 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
ExtAudioFileCreateNew questions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ExtAudioFileCreateNew questions


  • Subject: ExtAudioFileCreateNew questions
  • From: "Kevin Dixon" <email@hidden>
  • Date: Sat, 29 Mar 2008 22:02:50 -0400 (EDT)
  • Importance: Normal

I'm opening a given file, to be processed offline, and then saved into
another file. I'm using ExtAudioFile for this.

When I go to create the new file, I first open the source file and get its
stream description and channel layout. I cache these, and then call
ExtAudioFileCreateNew as shown here

OSStatus error = ExtAudioFileCreateNew(&fileSystemFile, cfFileName,
kAudioFileAIFFType, &fileFormat, &fileLayout, &outputFile);

where fileSystemFile is an FSRef to the directory to save in, cfFileName
is the CFStringRef for the file name, AIFF format, and fileFormat is the
input file's stream description and fileLayout is the input file's channel
layout.  outputFile is the ExtAudioFileRef.

When I execute this code, error = 1718449215 and outputFile is set to
NULL, which would seem to indicate failure. However before I call
...Dispose I notice the file has been created in the appropriate place on
my hard disk.
--What could be causing such a failure? Some invalid combination of
arguments?


Also, I was originally hoping to use the same output file format (e.g. WAV
in WAV out) as the input, but I couldn't see an easy way to map
AudioStreamBasicDescription.mFormatID or something to an AudioFileTypeID.
I realize that more varieties of formats can be read than can be written,
but if both are available, I would prefer to use the same in/out format.
Any suggestions to this end?

Thanks in advance!

-Kevin
 _______________________________________________
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: ExtAudioFileCreateNew questions
      • From: Brian Willoughby <email@hidden>
  • Prev by Date: Re: loading AU from app's bundle?
  • Next by Date: Re: ExtAudioFileCreateNew questions
  • Previous by thread: what does kMusicDeviceProperty_StreamFromDisk do ?
  • Next by thread: Re: ExtAudioFileCreateNew questions
  • Index(es):
    • Date
    • Thread