tags:

views:

383

answers:

4

i want to play a warning sound in C# at some event\decision

how to play sounds in C# winforms and adjust volumes etc

+4  A: 

Hi King,

NAudio is a great libary for this sort of functionality. You can find it here: http://naudio.codeplex.com/

& an introductory tutorial here: http://opensebj.blogspot.com/2009/02/introduction-to-using-naudio.html

Cheers, Sebastian

Sebastian Gray
hey really great library there...cool work
Junaid Saeed
+1  A: 

Try this link MSDN and also here for additional reading.

Saif Khan
+3  A: 

For playing sound simply, with no interaction you can use System.Media.SoundPlayer:

System.Media.SoundPlayer player = new System.Media.SoundPlayer();
player.SoundLocation = "soundFile.wav";
player.Play();
Charlie boy
A: 

if i use the method given in your msdn or the code that "charlie boy" posted above. is there gonna be a difference between memory usage and other resources etc, are they gonna make the form heavy or light...

Junaid Saeed