mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-12-22 13:33:40 +00:00
[client] audio/pw: fix muting
Pipewire documents the mute parameter as a bool, however `pw_stream_set_control` expects a float value and converts it to a bool.
6ad6300ec6/src/pipewire/stream.c (L2063)
This commit is contained in:
parent
f3fe774f69
commit
6d06320fb2
@ -358,7 +358,8 @@ static void pipewire_playbackVolume(int channels, const uint16_t volume[])
|
||||
static void pipewire_playbackMute(bool mute)
|
||||
{
|
||||
pw_thread_loop_lock(pw.thread);
|
||||
pw_stream_set_control(pw.playback.stream, SPA_PROP_mute, 1, (void *)&mute, 0);
|
||||
float val = mute ? 1.0f : 0.0f;
|
||||
pw_stream_set_control(pw.playback.stream, SPA_PROP_mute, 1, &val, 0);
|
||||
pw_thread_loop_unlock(pw.thread);
|
||||
}
|
||||
|
||||
@ -515,7 +516,8 @@ static void pipewire_recordVolume(int channels, const uint16_t volume[])
|
||||
static void pipewire_recordMute(bool mute)
|
||||
{
|
||||
pw_thread_loop_lock(pw.thread);
|
||||
pw_stream_set_control(pw.record.stream, SPA_PROP_mute, 1, (void *)&mute, 0);
|
||||
float val = mute ? 1.0f : 0.0f;
|
||||
pw_stream_set_control(pw.record.stream, SPA_PROP_mute, 1, &val, 0);
|
||||
pw_thread_loop_unlock(pw.thread);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user