[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.interop

Setting default playback device programaticaly

ambeer

3/20/2007 7:48:00 AM

So anybody knows how can i set default playback device (i have 3 sounds
cards installed on my win xp sp2) from my application which is written with
c#?

I can get the default device by using

[DllImport("winmm.dll")]

public static extern int waveOutOpen(out IntPtr hWaveOut, int uDeviceID, ref
WAVEFORMATEX lpFormat, IntPtr dwCallback, IntPtr dwInstance, int dwFlags);

i can enumerate all 3 sound devices in my app, but i can't find out how to
set the default playback device programatically (i want to emulate setting
Control Panle->Sounds and Audio devices Properties->Audio->SSound playback
(Default device))



thanks