Re: Enumerating and switching audio devices (NEWBIE)
Re: Enumerating and switching audio devices (NEWBIE)
- Subject: Re: Enumerating and switching audio devices (NEWBIE)
- From: Michael Thornburgh <email@hidden>
- Date: Mon, 7 Mar 2005 12:55:24 -0800
counting channels for directions (input or output) is how i determine
whether a device supports input and/or output.
the sample app that comes with MTCoreAudio (shameless plug),
"AudioMonitor", contains a class "MTAudioDeviceBrowser" that you can
drop into your app and hook up to some UI and a delegate for exactly
your purpose (choosing a device for input or output). its delegate
messages can let you influence a default device to present (say, from
the user's preferences). it's Objective-C, though.
http://aldebaran.armory.com/~zenomt/macosx/MTCoreAudio/
-mike
On Mar 7, 2005, at 12:00 PM, Lorenzo Thurman wrote:
I'm new to this audio stuff, so I apologize for what is probably a
simple question, but here goes:
I'm writing an app that will enumerate the audio devices on a system,
determine which devices are output and/or input and then allow the
user to switch between devices as desired. I found some sample code on
Apples site, ComplexPlaythru, which pretty does what I want, but its
all in C++ and I need to brush up on that. It seems if I spend too
much time in one language, I forget everything else. I've done no Java
in 4 years, and I bet if I start coding there again, I'll have to
start from scratch, but I digress. What confuses me about the code, is
that it appears that it makes a determination as to whether a device
is input or output by counting channels. Am I understanding that
correctly? That seems odd. Anyway, from what I've read in "Audio and
MIDI on MaOSX" and "Core Audio" (PDF's), what I should do would go
something like this:
enumerate devices
determine each devices capabilities
enable IO on the selected device
switch to the selected device
Would this be just about right?
TIA
"There are 10 types of people in this world: those who understand
binary, those who don't"
--Unknown
_______________________________________________
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