sndPlaySound function problem

  • Thread starter Thread starter Ansh
  • Start date Start date
A

Ansh

i want to play a .wav file using sndPlaySound and PlaySound function
but both function doesn't works in the expected way... i just hear a
click sound after execution of these functions.... not the original
recorded sound of .wav file.... on the other hand when i make use of
wave functions to play sound it works fine... can anybody tell that
what exactly the problem is??? all docs i read suggests that these
functions works fine if we hav eto play only a single wave file... but
this doesn't works in my case.... help me...
 
Try this: (My testBox1.Text is a wav file name with the path)

System.Media.SoundPlayer player = new
System.Media.SoundPlayer(textBox1.Text);

player.Play();
 
Back
Top