mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2026-08-10 03:47:35 +00:00
snd_worker: Don't send empty audio-volume messages
If no volume has been set it, we end up sending a volume message with audio-volume for 0 channels (iow an empty message). This is not useful and triggers the following warning in spice-gtk: (remote-viewer:8726): GSpice-WARNING **: set_sink_input_volume() failed: Invalid argument Signed-off-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
parent
baa7cab700
commit
71315b2e09
@ -1100,6 +1100,7 @@ static void on_new_playback_channel(SndWorker *worker)
|
|||||||
{
|
{
|
||||||
PlaybackChannel *playback_channel =
|
PlaybackChannel *playback_channel =
|
||||||
SPICE_CONTAINEROF(worker->connection, PlaybackChannel, base);
|
SPICE_CONTAINEROF(worker->connection, PlaybackChannel, base);
|
||||||
|
SpicePlaybackState *st = SPICE_CONTAINEROF(worker, SpicePlaybackState, worker);
|
||||||
|
|
||||||
spice_assert(playback_channel);
|
spice_assert(playback_channel);
|
||||||
|
|
||||||
@ -1107,7 +1108,9 @@ static void on_new_playback_channel(SndWorker *worker)
|
|||||||
if (playback_channel->base.active) {
|
if (playback_channel->base.active) {
|
||||||
snd_set_command((SndChannel *)playback_channel, SND_PLAYBACK_CTRL_MASK);
|
snd_set_command((SndChannel *)playback_channel, SND_PLAYBACK_CTRL_MASK);
|
||||||
}
|
}
|
||||||
snd_set_command((SndChannel *)playback_channel, SND_PLAYBACK_VOLUME_MASK);
|
if (st->volume.volume_nchannels) {
|
||||||
|
snd_set_command((SndChannel *)playback_channel, SND_PLAYBACK_VOLUME_MASK);
|
||||||
|
}
|
||||||
if (playback_channel->base.active) {
|
if (playback_channel->base.active) {
|
||||||
reds_disable_mm_timer();
|
reds_disable_mm_timer();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user