Re: Deinterleave using ExtendedAudioFile
Re: Deinterleave using ExtendedAudioFile
- Subject: Re: Deinterleave using ExtendedAudioFile
- From: Aulis Telle <email@hidden>
- Date: Tue, 20 Mar 2007 17:30:39 +0100
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:
This email sent to email@hidden