On Tue, Jul 8, 2008 at 3:25 PM, Jason Bobier <[EMAIL PROTECTED]> wrote:
> Has anyone figured out how to control a machine's volume level (specifically
> muting) from code? I know that you can do it from Applescript, but running
> an applescript from code seems to be a rather clunky approach.
>
> This is for emergency notification, so I have to be able to crank the volume
> on the system and then restore it afterwards.
>

Take a read of QA1016:
<http://developer.apple.com/qa/qa2006/qa1016.html>

Also, TN2102, if you haven't already:
<http://developer.apple.com/technotes/tn2002/tn2102.html>

However, I would urge you not to mess around with the user's volume
control, even you think it is an "emergency"---the user may feel very
differently. Your application should play an alert sound, and trust
that the user's system output volume and alert volume are correct for
what they want to hear (although, I have no idea what your application
does; but in the general case, messing around with user settings when
they don't expect it isn't good).

-Phil
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to