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

Re: More ExtAudioFile questions


  • Subject: Re: More ExtAudioFile questions
  • From: Doug Wyatt <email@hidden>
  • Date: Thu, 21 May 2009 18:28:20 -0700


On May 21, 2009, at 17:04 , Ethan Funk wrote:


I have a new problem related to my newly created ExtAudioFile. After setting the client data format, I move on and access the AudioConverter:

size = sizeof(converter);
err = ExtAudioFileGetProperty(audioFileID, kExtAudioFileProperty_AudioConverter, &size, &converter);


No problem.  Then I set the converters bit rate and quality:

err = AudioConverterSetProperty(converter, kAudioConverterEncodeBitRate, sizeof(value), &rate);
err = AudioConverterSetProperty(converter, kAudioConverterCodecQuality, sizeof(value), &quality);


Again, no problem.
Finally, I send a NULL ConverterConfig CFArray to force the associated AudioConverter to update:


err = ExtAudioFileSetProperty(audioFileID, kExtAudioFileProperty_ConverterConfig, 0, NULL);

and bamm! the code crashes. I also tried creating an empty CFArray and passing that in... same result. What am I missing?

I know you must have read the header :-)

/*
N.B. If you alter any properties of the AudioConverterRef, for example,
an encoder's bit rate, you must set the kExtAudioFileProperty_ConverterConfig
property on the ExtAudioFileRef afterwards. A NULL configuration is
sufficient. This will ensure that the output file's data format is consistent
with the format being produced by the converter.
*/


This should do the trick:

CFArrayRef config = NULL;
err = ExtAudioFileSetProperty(audioFileID, kExtAudioFileProperty_ConverterConfig, sizeof(config), &config);




I guess the docs could use a concrete example.

Doug

_______________________________________________
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: 
 >More ExtAudioFile questions (From: Ethan Funk <email@hidden>)

  • Prev by Date: Re: Error -66626
  • Next by Date: Debugging with auval
  • Previous by thread: More ExtAudioFile questions
  • Next by thread: Error -66626
  • Index(es):
    • Date
    • Thread