Browse files

[rbp/omxplayer] Fix audio volume jumps when switching tracks

When the global volume has been set low, and a sequence of tracks are being played, there are complaints of occasional jumps to full volume.
This is down to a race condition where the volume request can arrive at OMXAudio before it has been initialised.
The fix is simple, don't send the volume change until m_CurrentAudio.started.
  • Loading branch information...
1 parent 833b871 commit 067058c557dde84300efe56e8881aed3a6caf75b @popcornmix popcornmix committed Apr 18, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 xbmc/cores/omxplayer/OMXPlayer.cpp
2 xbmc/cores/omxplayer/OMXPlayer.cpp
@@ -1302,7 +1302,7 @@ void COMXPlayer::Process()
if (IsBetterStream(m_CurrentSubtitle, pStream)) OpenSubtitleStream(pStream->iId, pStream->source);
if (IsBetterStream(m_CurrentTeletext, pStream)) OpenTeletextStream(pStream->iId, pStream->source);
- if(m_change_volume)
+ if(m_change_volume && m_CurrentAudio.started)
m_player_audio.SetCurrentVolume(m_current_mute ? VOLUME_MINIMUM : m_current_volume);
m_change_volume = false;

0 comments on commit 067058c

Please sign in to comment.