real mute volume on lowest volume level .. but not show the mute symbol
[enigma2.git] / lib / dvb / volume.cpp
index 8a88480f331f7b7a0dcb129bf47169922c916b89..fc1048043810e74becd7ba6c2d79f6157ac258c5 100644 (file)
@@ -73,21 +73,26 @@ void eDVBVolumecontrol::setVolume(int left, int right)
        right = 63 - rightVol * 63 / 100;
                /* now range is 63..0, where 0 is loudest */
 
-#if HAVE_DVB_API_VERSION < 3   
+#if HAVE_DVB_API_VERSION < 3
        audioMixer_t mixer;
 #else
        audio_mixer_t mixer;
 #endif
 
-#ifdef HAVE_DVB_API_VERSION
+#if HAVE_DVB_API_VERSION < 3
                /* convert to linear scale. 0 = loudest, ..63 */
        mixer.volume_left = 63.0-pow(1.068241, 63-left);
        mixer.volume_right = 63.0-pow(1.068241, 63-right);
+#else
+       mixer.volume_left = left;
+       mixer.volume_right = right;
 #endif
 
        printf("Setvolume: %d %d (raw)\n", leftVol, rightVol);
        printf("Setvolume: %d %d (-1db)\n", left, right);
+#if HAVE_DVB_API_VERSION < 3
        printf("Setvolume: %d %d (lin)\n", mixer.volume_left, mixer.volume_right);
+#endif
 
        int fd = openMixer();
        if (fd >= 0)
@@ -113,8 +118,6 @@ void eDVBVolumecontrol::setVolume(int left, int right)
 
 int eDVBVolumecontrol::getVolume()
 {
-       if (isMuted())
-               return 0;
        return leftVol;
 }