Re: Mute System
Re: Mute System
- Subject: Re: Mute System
- From: "I. Savant" <email@hidden>
- Date: Thu, 13 Mar 2008 06:58:10 -0400
On Mar 13, 2008, at 12:10 AM, Christopher Nebel wrote:
Uh, yeah. We consider using AppleScript from an otherwise Objective-
C app for anything other than user-supplied scripts to be bad form,
because it's wildly inefficient. In particular, you shouldn't use
it just because you can't find the real API. Appropriate tool for
the job, and all that. AudioDeviceGetProperty and
AudioDeviceSetProperty are the calls you want.
It really depends on what you're expecting to accomplish, doesn't
it? Does the extra millisecond or two to execute an AppleScript versus
AudioDeviceSetProperty really matter for anything other than
professional audio applications? Would the user notice? Would the
system notice?
If you just want to mute the system volume from an application that
isn't focused, what's wrong with AppleScript? It isn't like you're
going to be muting and un-muting fifty times per second ...
--
I.S.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden