• 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
Re: Changing the default input/output device
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Changing the default input/output device


  • Subject: Re: Changing the default input/output device
  • From: William Stewart <email@hidden>
  • Date: Tue, 10 Nov 2009 17:08:38 -0800

But, please don't do this.

The user sets this in a sound preference (in UI) and this affects iTunes, QT and other playback systems (including games) that rely on this value that the user has control over.

You should just play to the default device, or if that's not what you want, then play to any device you like (with I presume your own UI) but don't set the default device (or show UI to do that).

Bill

On Nov 10, 2009, at 3:48 PM, Jeff Moore wrote:

Presuming you know which device you want to set as the default device, you would actually set it with code like this:

OSStatus SetDefaultOutputDevice(AudioObjectID inDeviceID)
{
AudioObjectPropertyAddress theAddress = { kAudioHardwarePropertyDefaultOutputDevice, kAudioObjectPropertyScopeGlobal, kAudioObjectPropertyElementMaster };
UInt32 theSize = sizeof(AudioObjectID);
return AudioObjectSetPropertyData(kAudioObjectSystemObject, &theAddress, 0, NULL, &theSize, &inDeviceID);
}


On Nov 10, 2009, at 3:36 PM, Florian Winterstein wrote:

I would like to change the default input or output devices from my application but I did not find any documentation or examples on how to do it.


--

Jeff Moore
Core Audio
Apple



_______________________________________________
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

_______________________________________________ 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: Changing the default input/output device
      • From: tahome izwah <email@hidden>
References: 
 >Changing the default input/output device (From: Florian Winterstein <email@hidden>)
 >Re: Changing the default input/output device (From: Jeff Moore <email@hidden>)

  • Prev by Date: Re: AudioQueue performance on iPhone
  • Next by Date: Re: AU hosting: automation, presets and GUI updating
  • Previous by thread: Re: Changing the default input/output device
  • Next by thread: Re: Changing the default input/output device
  • Index(es):
    • Date
    • Thread