change default system output device
change default system output device
- Subject: change default system output device
- From: Kaan Erdener <email@hidden>
- Date: Thu, 7 Jun 2007 11:22:35 -0500
hello,
I've written a small utility to show current / list all / change the
default system output device, and I've encountered something I don't
understand. My "show current device" stuff works fine, the "list all
devices" works fine, but the "change device" doesn't work as
expected. I don't see any errors, but what I want is to change the
system-wide output device, and that doesn't happen.
Here's what I'm doing:
// deviceIdData is char* that's set up elsewhere
AudioDeviceID deviceId = (UInt32) [[NSString
stringWithUTF8String:deviceIdData] intValue];
UInt32 size = sizeof(deviceId);
OSStatus err = AudioHardwareSetProperty
(kAudioHardwarePropertyDefaultSystemOutputDevice, size, &deviceId);
if (err != noErr) {
printf("error\n");
}
If I use an invalid input value for deviceIdData, I can generate an
error, so that's good. If I use a valid value, I see no errors, and
subsequent checks for "show current device" show the device that I
just set. But when I open System Preferences, there is no change in
output device. What am I missing?
I could make several guesses as to what's going on, haven't found
much info about this behavior, so any and all help would be greatly
appreciated.
thanks,
Kaan
_______________________________________________
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