playsink: Reset {mute,volume}-changed flags after setting the volume
These flags are there to make sure that the volume is set, if there is no volume element yet.
This commit is contained in:
parent
598c937634
commit
e72c3029c0
@ -1538,6 +1538,7 @@ gen_audio_chain (GstPlaySink * playsink, gboolean raw, gboolean queue)
|
|||||||
/* use the sink to control the volume and mute */
|
/* use the sink to control the volume and mute */
|
||||||
if (playsink->volume_changed) {
|
if (playsink->volume_changed) {
|
||||||
g_object_set (G_OBJECT (chain->volume), "volume", playsink->volume, NULL);
|
g_object_set (G_OBJECT (chain->volume), "volume", playsink->volume, NULL);
|
||||||
|
playsink->volume_changed = FALSE;
|
||||||
}
|
}
|
||||||
if (playsink->mute_changed) {
|
if (playsink->mute_changed) {
|
||||||
if (chain->mute) {
|
if (chain->mute) {
|
||||||
@ -1546,6 +1547,7 @@ gen_audio_chain (GstPlaySink * playsink, gboolean raw, gboolean queue)
|
|||||||
if (playsink->mute)
|
if (playsink->mute)
|
||||||
g_object_set (chain->volume, "volume", (gdouble) 0.0, NULL);
|
g_object_set (chain->volume, "volume", (gdouble) 0.0, NULL);
|
||||||
}
|
}
|
||||||
|
playsink->mute_changed = FALSE;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* no volume, we need to add a volume element when we can */
|
/* no volume, we need to add a volume element when we can */
|
||||||
@ -1718,6 +1720,7 @@ setup_audio_chain (GstPlaySink * playsink, gboolean raw, gboolean queue)
|
|||||||
playsink->volume);
|
playsink->volume);
|
||||||
/* use the sink to control the volume */
|
/* use the sink to control the volume */
|
||||||
g_object_set (G_OBJECT (chain->volume), "volume", playsink->volume, NULL);
|
g_object_set (G_OBJECT (chain->volume), "volume", playsink->volume, NULL);
|
||||||
|
playsink->volume_changed = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_signal_connect (chain->volume, "notify::volume",
|
g_signal_connect (chain->volume, "notify::volume",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user