mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
dirctsoundsink: Setting volume should not unmute
https://bugzilla.gnome.org/show_bug.cgi?id=755106
This commit is contained in:
parent
e345a7fee9
commit
93d09f0474
1 changed files with 2 additions and 2 deletions
|
@ -915,7 +915,7 @@ gst_directsound_sink_set_volume (GstDirectSoundSink * dsoundsink,
|
||||||
* here, so remap.
|
* here, so remap.
|
||||||
*/
|
*/
|
||||||
long dsVolume;
|
long dsVolume;
|
||||||
if (volume == 0)
|
if (volume == 0 || dsoundsink->mute)
|
||||||
dsVolume = -10000;
|
dsVolume = -10000;
|
||||||
else
|
else
|
||||||
dsVolume = 100 * (long) (20 * log10 ((double) volume / 100.));
|
dsVolume = 100 * (long) (20 * log10 ((double) volume / 100.));
|
||||||
|
@ -923,7 +923,7 @@ gst_directsound_sink_set_volume (GstDirectSoundSink * dsoundsink,
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (dsoundsink,
|
GST_DEBUG_OBJECT (dsoundsink,
|
||||||
"Setting volume on secondary buffer to %d from %d", (int) dsVolume,
|
"Setting volume on secondary buffer to %d from %d", (int) dsVolume,
|
||||||
(int) dsoundsink->volume);
|
(int) volume);
|
||||||
IDirectSoundBuffer_SetVolume (dsoundsink->pDSBSecondary, dsVolume);
|
IDirectSoundBuffer_SetVolume (dsoundsink->pDSBSecondary, dsVolume);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue