2009-09-22, 16:14
Hi Everyone,
I was having issues with AAC multi channel audio so I loaded up visual c++ express and took a look.
According to the AAC spec page at Apple, there are four different channel maps for AAC 5.1 and 5.0. I found that channel map "A" was what worked for me.
With these arrays changed as follows, AAC audio works for me in 4 movies (and an aac 5.1 setup video) that I had available.
To be clear, I use multi channel analog output, I don't know how this will affect HDMI/SPDIF audio.
From Apples spec page:
kAudioChannelLayoutTag_MPEG_5_1_A
MPEG 5.1-channel layout A (left, right, center, low-frequency effects, left surround, right surround).
kAudioChannelLayoutTag_MPEG_5_0_A
MPEG 5-channel layout A (left, right, center, left surround, right surround).
Corresponding arrays in Win32DirectSound.cpp:
const unsigned char aac_51_Map[] = {2,0,1,4,5,3}; // Sent as C, FL, FR, SL, SR, LFE
const unsigned char aac_50_Map[] = {2,0,1,4,5}; // Sent as C, FL, FR, SL, SR
Attached is the aac 5.1 test video I used to confirm my channel mappings.
http://www.mediafire.com/?mz5vwzovkwn
Thanks to all the XBMC devs for all their hard work!
Paulicat.
I was having issues with AAC multi channel audio so I loaded up visual c++ express and took a look.
According to the AAC spec page at Apple, there are four different channel maps for AAC 5.1 and 5.0. I found that channel map "A" was what worked for me.
With these arrays changed as follows, AAC audio works for me in 4 movies (and an aac 5.1 setup video) that I had available.
To be clear, I use multi channel analog output, I don't know how this will affect HDMI/SPDIF audio.
From Apples spec page:
kAudioChannelLayoutTag_MPEG_5_1_A
MPEG 5.1-channel layout A (left, right, center, low-frequency effects, left surround, right surround).
kAudioChannelLayoutTag_MPEG_5_0_A
MPEG 5-channel layout A (left, right, center, left surround, right surround).
Corresponding arrays in Win32DirectSound.cpp:
const unsigned char aac_51_Map[] = {2,0,1,4,5,3}; // Sent as C, FL, FR, SL, SR, LFE
const unsigned char aac_50_Map[] = {2,0,1,4,5}; // Sent as C, FL, FR, SL, SR
Attached is the aac 5.1 test video I used to confirm my channel mappings.
http://www.mediafire.com/?mz5vwzovkwn
Thanks to all the XBMC devs for all their hard work!
Paulicat.