AudioKit on macOS: get/set system device volume

旧时模样 提交于 2019-12-13 09:45:28

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!