Help - Search - Members - Calendar
Full Version: Enumerating Audio Devices via API
Skype Community > English > Development, Betas and Skype Garage > Skype Public API
seanp_
I'm trying to write a small System Tray switcher on a PC using VB.NET and can't seem to find anything in the API that allows me to enumerate the audio devices in the same way as the Skype GUI.

I want to be able to choose and set devices for two states - Online and Away - and I can't figure out how to populate combo boxes for the relevant devices for both states.

I know I can retrieve and set the current Audio devices, but I need to build a list of all available to allow me to select and store for the two states.

Am I missing something in the API? If not, can anyone please give me some advice as to which .NET namespaces or WIN32 APIs might help me to do this?

Thanks in advance!
jasonbsteele_
Sean,

There used to be an excellent article called "Build your own drum machine" (or something like that) at
http://msdn.microsoft.com/vbasic/using/col...fun02032004.asp
but it doesn't seem to be there anymore. You could try to find where its been moved to or archived.

Also the VB namespace My.Computer.Audio provides some useful audio stuff - but it may be too basic for what you're trying to achieve.
seanp_
Many thanks for this Jason, I've located the C# sample on the MSDN site and this should do as a prompter. At least I can dive into the managed DirectX namespaces once I've downloaded the SDK.

Also, I'll take a look at VB namespace.

I guess I can hard code them based on what I know the values on my system are but this isn't desirable and certainly wouldn't be transportable to another system.

Interestingly I had found a Win32 API sample that enumerates devices, but it returned 2 extra unusable devices that the Skype technique manages to avoid listing.

Anyhow, I'll crack on with this - thanks again!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.