Re: Proper API for selecting devices
Re: Proper API for selecting devices
- Subject: Re: Proper API for selecting devices
- From: "Roni Music" <email@hidden>
- Date: Mon, 22 Nov 2004 16:10:41 +0100
> Here's what I wrote the last time. It still answers the question.
>
> > 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).
OK, get that now
>
> I should also point out that CD audio is not accessed through an audio
> device on Mac OS X. It is accessed through the file system, so you'll
> never find that source.
>
> The HALLab sample code (/Developer/Examples/CoreAudio/HAL/HALLab) has
> code that illustrates how to access the data source properties on a
> device.
Yes, that explains it good, at least the code.
And it build fine.
But it always only displays the "System" Window at startup.
How do I get it to display the "Devices" window?
(Cocoa is not my "cup of tea")
Thanks for responding
Rolf Nilsson
> If you are having problems with the control, please post a more
> directed question about it and I'll be happy to help you out.
>
> On Nov 19, 2004, at 5:54 AM, Rolf Nilsson wrote:
>
> >
> > Hi,
> >
> > I have exactly the same problem with my application.
> > I have recently added a drop down list for selecting in and output
> > devices.
> > Essential the same code as in the ComplexPlayThru example which works
> > fine on my dual G4 running OS X10.2.8 or 10.3.6
> >
> > On computers that have a built in microphone only this device is
> > found, not the physical line-input. At least this is what users
> > reports.
> >
> > So how should we detect all devices?
> >
> > A workaround is to add an item in the drop down selection list that
> > just select the "default device" as set up in the system preferences
> > sound panel
> > (same as wavemapper/midimapper under Windows)
> >
> > Rolf NIlsson
> >
> >
> > >
> > > 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
>
>
>
>
> ------------------------------
>
> _______________________________________________
> Coreaudio-api mailing list
> email@hidden
> http://lists.apple.com/mailman/listinfo/coreaudio-api
>
> End of Coreaudio-api Digest, Vol 1, Issue 80
> ********************************************
_______________________________________________
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