Change Volume on Mac programmatically

无人久伴 提交于 2019-11-28 04:02:30

问题


I'm looking for a not applescript way to change the system volume on Mac OS X programmatically. I just couldn't find a solution. Anyone any ideas?


回答1:


Take a look at this class:

https://github.com/InerziaSoft/ISSoundAdditions

It can change system volume and make use of CoreAudio API.

An example of usage should look like this:

[NSSound setSystemVolume:0.5]


来源:https://stackoverflow.com/questions/6278589/change-volume-on-mac-programmatically

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