Skip to content

Commit

Permalink
Fix muting
Browse files Browse the repository at this point in the history
  • Loading branch information
leolost2605 committed Jan 24, 2024
1 parent 8558935 commit 48c1fe9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/PulseAudioManager.vala
Original file line number Diff line number Diff line change
Expand Up @@ -209,13 +209,13 @@ public class Sound.PulseAudioManager : GLib.Object {
}

public void change_device_mute (Device? device, bool mute = true) {
if (device == null || device.source_name == null) {
if (device == null) {
return;
}

if (device.input) {
if (device.input && device.source_name != null) {
context.set_source_mute_by_name (device.source_name, mute, null);
} else {
} else if (device.sink_name != null) {
context.set_sink_mute_by_name (device.sink_name, mute, null);
}
}
Expand Down

0 comments on commit 48c1fe9

Please sign in to comment.