Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
changed: remap mono audio to stereo even if we have a center speaker
This also fixes mono audio when using digital out when a center speaker
is enabled.

git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@35622 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
  • Loading branch information
anssih committed Dec 12, 2010
1 parent c7f5556 commit f408442
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions xbmc/utils/PCMRemap.cpp
Expand Up @@ -164,6 +164,7 @@ static struct PCMMapInfo PCMDownmixTable[PCM_MAX_CH][PCM_MAX_MIX] =
CPCMRemap::CPCMRemap() :
m_inSet (false),
m_outSet (false),
m_ignoreLayout(false),
m_inChannels (0),
m_outChannels (0),
m_inSampleSize(0)
Expand Down Expand Up @@ -267,6 +268,16 @@ void CPCMRemap::ResolveChannels()
}
}

/* force mono audio to front left and front right */
if (!m_ignoreLayout && m_inChannels == 1 && m_inMap[0] == PCM_FRONT_CENTER
&& m_useable[PCM_FRONT_LEFT] && m_useable[PCM_FRONT_RIGHT])
{
CLog::Log(LOGDEBUG, "CPCMRemap: Mapping mono audio to front left and front right");
m_useable[PCM_FRONT_CENTER] = false;
m_useable[PCM_FRONT_LEFT_OF_CENTER] = false;
m_useable[PCM_FRONT_RIGHT_OF_CENTER] = false;
}

/* see if our input has side/back channels */
for(in_ch = 0; in_ch < m_inChannels; ++in_ch)
switch(m_inMap[in_ch])
Expand Down

0 comments on commit f408442

Please sign in to comment.