• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
change default system output device
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: change default system output device
      • From: Jeff Moore <email@hidden>
  • Prev by Date: Audio Unit Presets and undo
  • Next by Date: Re: change default system output device
  • Previous by thread: Re: Audio Unit Presets and undo
  • Next by thread: Re: change default system output device
  • Index(es):
    • Date
    • Thread