Skip to content

Add option to mute all devices#61

Open
sidevesh wants to merge 3 commits intodeweller:masterfrom
sidevesh:patch-1
Open

Add option to mute all devices#61
sidevesh wants to merge 3 commits intodeweller:masterfrom
sidevesh:patch-1

Conversation

@sidevesh
Copy link

No description provided.

audio_switch.c Outdated
" -f format : output format (cli/human/json). Defaults to human.\n"
" -t type : device type (input/output/system/all). Defaults to output.\n"
" -m mute : sets the mute status (mute/unmute/toggle). For input/output only.\n"
" -A all : Can be used with -m mute option above to set mute status for all devices, can't be used if toggle mute status is specified\n"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no parameter <all> to this, right? Would mute-all and unmute-all to -m be better?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zuckschwerdt updated to use mute-all and unmute-all with -M and -U flags respectively

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new -M and -U again don't need a parameter. It should e.g. be
" -M : sets the mute status to mute for all devices of specified device type\n"
and not
" -M mute-all : sets the mute status to mute for all devices of specified device type\n"

But my suggestion -- just a suggestion really -- was to use:
" -m mute : sets the mute status (mute/mute-all/unmute/unmute-all/toggle). For input/output only.\n"
So we don't add new options.
But that is just my preference, your modified original is also a valid option (but could be confusing as you state in the text on when it applies)
" -A : Can be used with -m mute option above to set mute status for all devices, can't be used if toggle mute status is specified\n"

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see now what you meant, updated it

@sidevesh
Copy link
Author

sidevesh commented Sep 24, 2023

@deweller Can you take a look ? This is good to go and working fine for me,
taking @zuckschwerdt 's suggestion, I have added mute-all and unmute-all options only to the -m flag so changes to the cli interface are minimal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants