ExtAudioFile - Client Channel Layout
ExtAudioFile - Client Channel Layout
- Subject: ExtAudioFile - Client Channel Layout
- From: Sebastian Morsch <email@hidden>
- Date: Thu, 01 May 2014 00:14:23 +0200
Hi!
I’m trying to make use of ExtAudioFile's automatic channel layout mapping, but it doesn’t seem to work as I expected.
Here’s what I do:
- open a 6-Channel WAVE file into an extAudioFile
- set the client data format property (kExtAudioFileProperty_ClientDataFormat) to 6-Channel PCM Audio Unit Canonical
- read the file’s channel layout property (kExtAudioFileProperty_FileChannelLayout)
the resulting AudioChannelLayout struct has a kAudioChannelLayoutTag_MPEG_5_1_A which is correct (the file is L-R-C-LFE-LS-RS)
- set the client channel layout property (kExtAudioFileProperty_ClientChannelLayout)
now, I use the slightly different kAudioChannelLayoutTag_MPEG_5_1_C, which is L-C-R-LS-RS-LFE, which is what I want to use in my audio graph
- then, the file is read into an AudioBufferList and played back by the audio graph:
scheduled sound player -> matrix mixer (to down-convert the 5.1 signal to stereo) -> default out
Everything works fine, except the channel mapping doesn’t. The matrix mixer still receives a L-R-C-LFE-LS-RS stream.
I checked the docs for kExtAudioFileProperty_ClientChannelLayout:
"This property’s value specifies the channel layout of the buffers in an AudioBufferList list that you pass to the ExtAudioFileRead and ExtAudioFileWrite functions. This layout may be different from the file’s channel layout, in which case the extended audio file object’s underlying audio converter performs remapping. This property must be set after setting thekExtAudioFileProperty_ClientDataFormat property, and the number of channels in the two layouts must match."
I must be missing something, but I don’t know what… Does anyone have an idea how to make this work?
Very Best,
Sebastian
_______________________________________________
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