• 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: Proper API for selecting devices
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Proper API for selecting devices


  • Subject: Re: Proper API for selecting devices
  • From: Jeff Moore <email@hidden>
  • Date: Thu, 18 Nov 2004 12:26:04 -0800

The HAL provides the list of available devices through the kAudioHardwarePropertyDevices property. Then for each device, you can query the kAudioDevicePropertyDataSource family of properties to access the input source (e.g. line in or internal mic on my PB).

The Audacity guy is right when he says that the model on Mac OS X is different than it is on Windows (probably Linux too, but I don't really know) where the input sources for the hardware are treated in a flat fashion. Mac OS X presents a more hierarchic model where the source is accessed through the hardware it is attached to.

On Nov 17, 2004, at 7:53 PM, Randy Wilson wrote:

I've been trying to use the open source "Audacity" app to record on my Mac (both G5 dual 1GHz and 600MHz G3 iBook), but it inserts all sorts of clicks and noise when it records, even though the freeware "Audio In" application records just fine.

Audacity has a drop-down list of devices to use for input, but under OS X this list doesn't do anything. You have to go into preferences to choose the device, and even then you don't have the option to select the "mic in" or "line in" mode like you can from Apple's System Preferences.

I e-mailed the Audacity list, and I got the response below. The response made me think that perhaps there would be someone on this list that would know the proper way to get a list of inputs for the various devices that are available for audio in. Then the Audacity guys could add that into the code and select devices properly.

Let me know if you have suggestions, and/or send them to: email@hidden.

Thanks!


There is an odd confusuion in the way OS X does audio I/O. Whilst you can select between different audio input devices (sound cards, USB etc) there is no functional API for programs to change which input is used on a given device (CD, line, mic on a single card). This is set from a drop-down list on the toolbar when audacity is run on other OSes.


But even if we have to choose the device in the Preference menu, it
appears that Audacity doesn't currently get a full list of what is
available, and thus may be trying to grab from the wrong source.
I'm guessing you should be setting the device to the Onkyo in the audacity preferences, and then you will get the line or mic input, dependant on the setting in Mac OS. Not very elegant, but as I say, the interface is not consistent with other OSes (where the device and source choices are independant).

Richard Ash

_______________________________________________ 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


--

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: 
 >Proper API for selecting devices (From: Randy Wilson <email@hidden>)

  • Prev by Date: Re: AUCarbonViewBase cleanup
  • Next by Date: Re: Playing diffrents sounds continuosly
  • Previous by thread: Proper API for selecting devices
  • Next by thread: Re: Proper API for selecting devices
  • Index(es):
    • Date
    • Thread