Change Volume on Mac programmatically

后端 未结 2 2104
遥遥无期
遥遥无期 2020-12-19 06:32

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?

2条回答
  •  天命终不由人
    2020-12-19 07:19

    In case anybody is still interested in this topic: I have adapted the great ISSoundAdditions to Swift 5 and have also made its design a bit cleaner by declaring a public interface (NSSound.systemVolume)through which you can super easily manage the system sound volume through getting and setting properties (NSSound.systemVolume and NSSound.systemVolumeIsMuted). Check it out: https://github.com/mabi99/NSSound_SystemVolumeExtension

提交回复
热议问题