Re: Changing System Audio Output - Notifications to Apps?
Re: Changing System Audio Output - Notifications to Apps?
- Subject: Re: Changing System Audio Output - Notifications to Apps?
- From: Brian Willoughby <email@hidden>
- Date: Thu, 6 May 2010 17:12:29 -0700
On May 6, 2010, at 17:01, Seth Willits wrote:
In my Mac application I am changing the system audio output device
so that applications will send audio to this new device
(Soundflower). That part is easy. The problem is that some
applications don't respect that change for some reason, and instead
keep sending audio to the previous device (speakers, for example).
I'm curious why it works for some applications and not others. I
imagine that somehow the applications that don't switch to the new
device are somehow explicitly setting up their audio streams to
send to device that was the system output when they launched, and
ignoring any notifications.
Are there any notifications? Is there something I can do to make
those apps switch?
There are two possibilities.
It is perfectly legal for an application to send audio directly to a
given audio device, ignoring the AMS default output device, either by
hard-coding or by using a user preference that is private to the
application. In these cases, there is absolutely nothing you can do
except instruct the user to select a new audio device if their
application allows it. Admittedly, it's probably poor programming
for an application to honor the default output at launch time and
then ignore it later, but those cases may be explained by the other
possibility.
There is a notification in CoreAudio for when the default changes.
It's probably most likely that the problematic applications in
question have a bug because they're not tracking the notification at
all, or they are tracking it incorrectly. I've seen applications
crash when a device is removed - which sends a similar notification.
In other words, you're probably doing everything that you can if
applications like iTunes are switching audio to follow your new
settings. There might be an additional notification that you can
send, but CoreAudio probably handles it for you if you set the
default audio output preference correctly. The point of my response
is to stress that some application developers may not want to track
the default audio output, particularly if they prefer to be linked to
a specific audio device. One example would be professional audio
production applications versus consumer audio entertainment.
Brian Willoughby
Sound Consulting
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden