[Players] Avoid jumping volume to maximum after trickplay
authorpopcornmix <popcornmix@gmail.com>
Thu, 24 Oct 2013 12:14:23 +0000 (13:14 +0100)
committerpopcornmix <popcornmix@gmail.com>
Thu, 24 Oct 2013 12:15:34 +0000 (13:15 +0100)
For players that control volume, if the speed changes (e.g. with ff/rew) the volume gets reset to maximum.
This change sets it back to current value, although I question why it is being changed at all.
Do any players require muting during trickplay?

xbmc/ApplicationPlayer.cpp

index 14c5ab4..c67f69e 100644 (file)
@@ -20,6 +20,7 @@
 
 #include "ApplicationPlayer.h"
 #include "cores/IPlayer.h"
+#include "Application.h"
 
 #define VOLUME_MINIMUM 0.0f        // -60dB
 #define VOLUME_MAXIMUM 1.0f        // 0dB
@@ -693,7 +694,7 @@ void CApplicationPlayer::SetPlaySpeed(int iSpeed, bool bApplicationMuted)
   {
     if (m_iPlaySpeed == 1)
     { // restore volume
-      player->SetVolume(VOLUME_MAXIMUM);
+      player->SetVolume(g_application.GetVolume(false));
     }
     else
     { // mute volume