• 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
problrms trying to render a wav file from a music sequence
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

problrms trying to render a wav file from a music sequence


  • Subject: problrms trying to render a wav file from a music sequence
  • From: "Frank Quinn" <email@hidden>
  • Date: Mon, 23 Apr 2007 15:58:03 +0100

Hi List,


I have been trying to render audio from a music sequence and keep getting the same error: 1718449215. The error is from ExtAudioFileCreateNew(....) and represents the 4 char code  'fmt?' which translates into: kAudioConverterErr_FormatNotSupported which    
is defined in <AudioToolbox/AudioConverter.h> 


here is my code: (Note this works for aif but not wav files)

    renderFileASBD.mChannelsPerFrame = 2;
//    renderFileASBD.mSampleRate = 44100;
    renderFileASBD.mSampleRate = 48000; //CMD: changed export samplerate to 48k to ensure compatibility with editor's soundcards
    renderFileASBD.mFormatID = kAudioFormatLinearPCM;
    renderFileASBD.mBytesPerPacket = renderFileASBD.mChannelsPerFrame * 2;
    renderFileASBD.mFramesPerPacket = 1;
    renderFileASBD.mBytesPerFrame = renderFileASBD.mBytesPerPacket;
    renderFileASBD.mBitsPerChannel = 16;    //Lina: changed back to 16 bit because 24 bit causes a crash
    renderFileASBD.mFormatFlags = kLinearPCMFormatFlagIsBigEndian | kLinearPCMFormatFlagIsSignedInteger | kLinearPCMFormatFlagIsPacked;


    //Create the new audio file (deleting any file of the same name)
    Boolean isDir;
    FSRef dirRef;
    [[NSFileManager defaultManager] removeFileAtPath:[NSString stringWithFormat:@"%@/%@", dir, filename] handler:nil];
    require_noerr(err = FSPathMakeRef((const UInt8 *) [dir fileSystemRepresentation], &dirRef, &isDir), FAIL);
    require_noerr(err = ExtAudioFileCreateNew(&dirRef, (CFStringRef) filename, kAudioFileWAVEType, &renderFileASBD, NULL, &renderFileRef), FAIL);
then I get an error....

does anyboody know where i'm going wronig here? I have the proper file extension ".wav" which is set elsewhere. Is ".wav" export currently operational on intel macs???


Thanks for any help you can give!!!

best regards,


Frank
 _______________________________________________
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: problrms trying to render a wav file from a music sequence
      • From: Stephen Davis <email@hidden>
  • Prev by Date: Re: Audio Unit UI
  • Next by Date: Re: problrms trying to render a wav file from a music sequence
  • Previous by thread: Re: AudioHardwarePlugIn, AUHAL, and Timestamps
  • Next by thread: Re: problrms trying to render a wav file from a music sequence
  • Index(es):
    • Date
    • Thread