【发布时间】:2014-07-31 23:54:38
【问题描述】:
有没有办法使用 Objective-C 设置 Mac 的系统音量?我尝试使用:
AudioDeviceSetProperty([[self class]defaultOutputDeviceID],
NULL, //time stamp not needed
0, //channel 0 is master channel
false, //for an output device
kAudioDevicePropertyVolumeScalar,
sizeof(Float32),
&volume);
但在OS X 10.6(雪豹)之后已弃用;有一个更好的方法吗?还是我必须满足于申请量?
【问题讨论】:
标签: objective-c macos cocoa audiotoolbox