Some audio interfaces don't expose their active-ports with the default profile (which was ProAudio for my Focusrite Scarlett 2i2 (Gen. 3) in my case).
Since the mute state for set_source_mute_by_index is src.active_port.is_some() && mute the given source never gets muted if it hasn't any exposed active-ports.
Expectation
If a source has no active-port then muting seem senseless, doesn't it?
Either an error message with incompatible source would be helpful or a hint in the readme to check the profile if muting doesn't work.
Fix
The profile can be set in the pavucontrol GUI using the tab Configuration. The name of the profile is depending on the sound interface. It was 'Direct Scarlett Solo USB' in my case.
Anyway, I really like the simplicity of your project 🥳 Close the issue if it's to niche in your eyes, no worries at all :)
Some audio interfaces don't expose their active-ports with the default profile (which was
ProAudiofor myFocusrite Scarlett 2i2 (Gen. 3)in my case).Since the mute state for
set_source_mute_by_indexissrc.active_port.is_some() && mutethe given source never gets muted if it hasn't any exposed active-ports.Expectation
If a source has no active-port then muting seem senseless, doesn't it?
Either an error message with incompatible source would be helpful or a hint in the readme to check the profile if muting doesn't work.
Fix
The profile can be set in the pavucontrol GUI using the tab
Configuration. The name of the profile is depending on the sound interface. It was 'Direct Scarlett Solo USB' in my case.Anyway, I really like the simplicity of your project 🥳 Close the issue if it's to niche in your eyes, no worries at all :)