• 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: Jeff Moore <email@hidden>
  • Date: Tue, 10 Nov 2009 15:48:27 -0800

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

  • Follow-Ups:
    • Re: Changing the default input/output device
      • From: William Stewart <email@hidden>
References: 
 >Changing the default input/output device (From: Florian Winterstein <email@hidden>)

  • Prev by Date: Re: Changing the default input/output device
  • Next by Date: Re: Is entering MIDIEvents into MusicSequence while playing safe?
  • Previous by thread: Re: Changing the default input/output device
  • Next by thread: Re: Changing the default input/output device
  • Index(es):
    • Date
    • Thread