Skip to content
This repository
Browse code

[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...
commit 067058c557dde84300efe56e8881aed3a6caf75b 1 parent 833b871
popcornmix authored April 18, 2013

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  xbmc/cores/omxplayer/OMXPlayer.cpp
2  xbmc/cores/omxplayer/OMXPlayer.cpp
@@ -1302,7 +1302,7 @@ void COMXPlayer::Process()
1302 1302
     if (IsBetterStream(m_CurrentSubtitle, pStream)) OpenSubtitleStream(pStream->iId, pStream->source);
1303 1303
     if (IsBetterStream(m_CurrentTeletext, pStream)) OpenTeletextStream(pStream->iId, pStream->source);
1304 1304
 
1305  
-    if(m_change_volume)
  1305
+    if(m_change_volume && m_CurrentAudio.started)
1306 1306
     {
1307 1307
       m_player_audio.SetCurrentVolume(m_current_mute ? VOLUME_MINIMUM : m_current_volume);
1308 1308
       m_change_volume = false;

0 notes on commit 067058c

Please sign in to comment.
Something went wrong with that request. Please try again.