Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Deinterleave using ExtendedAudioFile



but there is no obvious way to do it if I am using ExtendedAudioFile. In ExtendedAudiFile I can set Channel Layout tags - but they don't seem to help much.

You simply extract the underlying AudioConverter from the ExtendedAudioFile


UInt32 size = sizeof(AudioConverterRef);
AudioConverterRef theConverter;
ExtAudioFileGetProperty(myAudioFile,
kExtAudioFileProperty_AudioConverter,
&size,
&theConverter);


Now you can set the channel map of the AudioConverter:

AudioConverterSetProperty(theConverter, kAudioConverterChannelMap,
    sizeof(channelMap), channelMap);

Be sure to also set kExtAudioFileProperty_ConverterConfig on the audio file afterwards to give it the chance to synchronize with the new settings (see documentation of kExtAudioFileProperty_AudioConverter for more details).

CFPropertyListRef config = NULL;
ExtAudioFileSetProperty (myAudioFile,
                                 kExtAudioFileProperty_ConverterConfig,
                                 sizeof (CFPropertyListRef),
                                 &config);

I hope that helps.

Aulis




_______________________________________________ Do not post admin requests to the list. They will be ignored. Coreaudio-api mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/coreaudio-api/email@hidden

This email sent to email@hidden
References: 
 >Deinterleave using ExtendedAudioFile (From: David Paterson <email@hidden>)
 >Re: Deinterleave using ExtendedAudioFile (From: William Stewart <email@hidden>)
 >Re: Deinterleave using ExtendedAudioFile (From: David Paterson <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.