SimplyCoreAudio icon indicating copy to clipboard operation
SimplyCoreAudio copied to clipboard

Fails to mute some types of audio devices.

Open tomaskupka opened this issue 2 years ago • 3 comments

Hey there, First thanks so much for this library, it works really well so far. I have recently encountered a behavior, which seems to be more general macOS behavior rather than this lib, however, I would like to ask for guidance.

Problem: I cannot mute certain types/brands of microphones.

It works very well for some mics (e.g. MacBook Pro, AirPods, Marshal headphones, etc.), however, it fails to mute for a mic RHODE NT-USB Mini.

When I run the code, it simply fails for this type of mic.

The only difference I spotted is, that this device appears as 1 item, having 1 in and 1 out. E.g. when you open "Audio MIDI setup", the native mac app. The other aforementioned devices (those that work well) appear as 2 items, 1 for input (mic) and the other for output (e.g. speakers).

Any idea why is that? Is there some trick or hack how to make any input device muted? I tried to lower the volume to 0, but the mic still listens to some extent, so that is not away.

Thanks in advance, Cheers, Tom

tomaskupka avatar Dec 21 '21 13:12 tomaskupka

What are you wanting to do in your application UI exactly?

ryanfrancesconi avatar Jan 03 '22 20:01 ryanfrancesconi

Hey Ryan, thanks for the reply. I'd like to be able to mute any type of microphone on a system level so other apps (e.g. Zoom), can't use it to stream the voice. It just works pretty well for some types as mentioned above. But for the specific one, I could not find if it is a macOS bug or it is not supported for some reason (which I would not understand why). What do you think? Would there be a way how to achieve that?

tomaskupka avatar Jan 03 '22 21:01 tomaskupka

@tomaskupka This is rather common. Many devices don't support setting even the most common properties such as mute or volume. One way to confirm this is by launching Audio MIDI Setup (included with macOS) and check if your device supports muting or changing volume. If the UI controls for mute or volume are disabled, then that means the device does not support changing these properties via Core Audio.

Screenshot 2022-01-16 at 12 57 35

rnine avatar Jan 16 '22 10:01 rnine