• 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 audio input and output devices
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Changing the Default audio input and output devices


  • Subject: Re: Changing the Default audio input and output devices
  • From: Jeff Moore <email@hidden>
  • Date: Thu, 9 Nov 2006 11:53:33 -0800

You are probably getting ahead of yourself. You would be well advised to look at our sample code, particularly

On Nov 9, 2006, at 11:37 AM, JavaDev wrote:

Thanks for reply Jeff.  Wrong choice of words, my bad.

Im working on a voice application that allows the user to select the input/output devices of choice, for instance, the USB Labtec headset instead of the Built-in output (speakers).

OK. I'm with you. You have some UI that lets the user select what device to use.


Using the CoreAudio API, I am able to get a list of all the devices and separate them to inputs and outputs, grab their names, and present them to the user.

Indeed. The HAL provides this API.

Once I know which device they would like to use in our application for audio input/output, which apple api can I use to "set" this? I have available an AudioDeviceID.

Sounds to me like you ought to be using AUHAL as your primary interface to the hardware. I'll leave how to use it to our sample code, but to tell it what device to use, you set the property kAudioOutputUnitProperty_CurrentDevice.


Thank you.

Jeff Moore wrote:
I think you'll need to be a bit more specific about what you want to do as, in general, applications should not be setting the default device. Settings like that belong to the user and are set using the system UI (Sound Prefs Panel, AMS, etc). There are always exceptions to every rule, but I'd like to hear more about what you are really trying to do first.

On Nov 9, 2006, at 7:11 AM, JavaDev wrote:

I've scanned the mail list and other online resources looking for some simple apple api to set an AudioDevice as the default (input or output) programmatically for an application.

I've seen references to creating an Audio unit and doing other such things but nothing concrete. Can anyone tell me how, if I have an AudioDeviceID, can I set this to be the default input or default output, accordingly?


--

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
References: 
 >Changing the Default audio input and output devices (From: JavaDev <email@hidden>)
 >Re: Changing the Default audio input and output devices (From: Jeff Moore <email@hidden>)
 >Re: Changing the Default audio input and output devices (From: JavaDev <email@hidden>)

  • Prev by Date: Re: Changing the Default audio input and output devices
  • Next by Date: kAudioOutputUnitProperty_IsRunning doesn't correspond to the audio device running
  • Previous by thread: Re: Changing the Default audio input and output devices
  • Next by thread: kAudioOutputUnitProperty_IsRunning doesn't correspond to the audio device running
  • Index(es):
    • Date
    • Thread