问题
I've used AudioKit.inputDevice, Audiotkit.outputDevice, and friends to get get all input and output devices on my Mac, and to get/set default input and output device.
I wish to read the current volume of these devices, and to be able to set it myself, but I can't find the correct AudioKit API for doing so.
Does anyone know how to do this?
回答1:
You will want to use a library similar to https://github.com/InerziaSoft/ISSoundAdditions
Changing sound volume becomes as simple as:
[NSSound setSystemVolume:0.5]
-- Duplicate of: Change Volume on Mac programmatically
来源:https://stackoverflow.com/questions/51618968/audiokit-on-macos-get-set-system-device-volume