Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/xbmc/cores/AudioRenderers/ALSADirectSound.cpp b/xbmc/cores/AudioRenderers/ALSADirectSound.cpp
- index 1e766c3..708c20a 100644
- --- a/xbmc/cores/AudioRenderers/ALSADirectSound.cpp
- +++ b/xbmc/cores/AudioRenderers/ALSADirectSound.cpp
- @@ -60,8 +60,17 @@ bool CALSADirectSound::Initialize(IAudioCallback* pCallback, const CStdString& d
- PCM_FRONT_CENTER, PCM_LOW_FREQUENCY,
- PCM_SIDE_LEFT , PCM_SIDE_RIGHT
- };
- + static enum PCMChannels HDMIChannelMap[] = { PCM_FRONT_LEFT, PCM_FRONT_RIGHT
- + , PCM_FRONT_CENTER, PCM_LOW_FREQUENCY
- + , PCM_BACK_LEFT, PCM_BACK_RIGHT
- + , PCM_FRONT_LEFT_OF_CENTER, PCM_FRONT_RIGHT_OF_CENTER
- + , PCM_BACK_CENTER, PCM_SIDE_LEFT, PCM_SIDE_RIGHT};
- + CStdString deviceuse(device);
- - CStdString deviceuse;
- +
- + enum PCMChannels *output_map = ALSAChannelMap;
- + if((deviceuse + ":").Left(5) == "hdmi:")
- + output_map = HDMIChannelMap;
- /* setup the channel mapping */
- m_uiDataChannels = iChannels;
- @@ -76,7 +85,7 @@ bool CALSADirectSound::Initialize(IAudioCallback* pCallback, const CStdString& d
- while(outLayout[ch] != PCM_INVALID)
- {
- for(map = 0; map < 8; ++map)
- - if (outLayout[ch] == ALSAChannelMap[map])
- + if (outLayout[ch] == output_map[map])
- {
- if (map > outChannels)
- outChannels = map;
- @@ -85,7 +94,7 @@ bool CALSADirectSound::Initialize(IAudioCallback* pCallback, const CStdString& d
- ++ch;
- }
- - m_remap.SetOutputFormat(++outChannels, ALSAChannelMap);
- + m_remap.SetOutputFormat(++outChannels, output_map);
- if (m_remap.CanRemap())
- {
- iChannels = outChannels;
- @@ -127,7 +136,6 @@ bool CALSADirectSound::Initialize(IAudioCallback* pCallback, const CStdString& d
- snd_config_update();
- snd_config_t *config = snd_config;
- - deviceuse = device;
- nErr = snd_config_copy(&config, snd_config);
- CHECK_ALSA_RETURN(LOGERROR,"config_copy",nErr);
Add Comment
Please, Sign In to add comment