Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change Volume on Mac programmatically

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?

like image 887
Chris Avatar asked Jun 08 '11 12:06

Chris


1 Answers

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]
like image 157
MrAsterisco Avatar answered Nov 12 '22 20:11

MrAsterisco