karaggeorge / macos-audio-devices

Get, set and configure the Audio Devices on macOS
MIT License
166 stars 17 forks source link

Added support for device muting. #13

Open apollon opened 3 years ago

apollon commented 3 years ago

Another attempt to add device mutinying 😆. (previous was in #5)

benswinburne commented 3 years ago

@apollon thanks for your work on this, much appreciated.

Would it be possible to implement a setDeviceMute as well as a get and toggle? I have a use case where I want to mute all devices by iterating over them. At present I'd have to getDeviceMute on each, and if unmuted, call toggle - not impossible obviously but would be a useful addition.

apollon commented 3 years ago

@apollon thanks for your work on this, much appreciated.

Would it be possible to implement a setDeviceMute as well as a get and toggle? I have a use case where I want to mute all devices by iterating over them. At present I'd have to getDeviceMute on each, and if unmuted, call toggle - not impossible obviously but would be a useful addition.

Sure, this is great idea.

karaggeorge commented 3 years ago

This looks great. Thank you for the PR! Looking through it, the only thing I can see is what I think you mentioned above, exposing the input/output specific methods to the js api, so when a device is both, they can be controlled separately.

On the CLI side, this could just be another flag maybe? Instead of defining more Command classes

apollon commented 3 years ago

@karaggeorge - Done 😎

apollon commented 3 years ago

@karaggeorge - should I add something else? For me its looks like I've fixed all comments and PR is ready to merge.

apollon commented 3 years ago

@karaggeorge - Done)