Skip to content

Commit

Permalink
Merge pull request xbmc#6576 from popcornmix/volume_fix
Browse files Browse the repository at this point in the history
[omxplayer] Fix for volume being treated as a linear scale
  • Loading branch information
popcornmix committed Mar 2, 2015
2 parents d99c07c + 86f581b commit d6485ad
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions xbmc/cores/omxplayer/OMXAudio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1050,6 +1050,8 @@ bool COMXAudio::ApplyVolume(void)
return false;

float fVolume = m_Mute ? VOLUME_MINIMUM : m_CurrentVolume;
// need to convert a log scale of 0.0=-60dB, 1.0=0dB to a linear scale (0.0=silence, 1.0=full)
fVolume = CAEUtil::GainToScale(CAEUtil::PercentToGain(fVolume));

// the analogue volume is too quiet for some. Allow use of an advancedsetting to boost this (at risk of distortion) (deprecated)
double gain = pow(10, (g_advancedSettings.m_ac3Gain - 12.0f) / 20.0);
Expand Down

0 comments on commit d6485ad

Please sign in to comment.