Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to mute all devices #61

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

sidevesh
Copy link

No description provided.

audio_switch.c Outdated
@@ -37,6 +37,7 @@ void showUsage(const char * appName) {
" -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