G
Guest
Hello,
I am wrtting a program that does some sound effects... the files are stored
in a subfolder in the application folder...
and I check the existence of the files before calling the method to play the
sound.
It works perfectly well in Windows XP, but when I move my application to a
Vista machine, the sound does not play...
I used a debug statement to confirm that the files are seen in the code but
somehow it does not play...
If I use the same file in a resource it plays... here is the code used
below:
I ran it through Visual Studio 2005 debugger, and the line
debug.WriteLine(...) shows that the if statement is true but no exceptions
is thrown and the audio does not play.... Help please...
If File.Exists(Path.Combine(Application.StartupPath, VoiceSounds(index)))
Then
Debug.WriteLine("found sound...." & Path.Combine(Application.StartupPath,
VoiceSounds(index)))
My.Computer.Audio.Play(Path.Combine(Application.StartupPath,
VoiceSounds(index)), AudioPlayMode.Background)
End If
Learner...
I am wrtting a program that does some sound effects... the files are stored
in a subfolder in the application folder...
and I check the existence of the files before calling the method to play the
sound.
It works perfectly well in Windows XP, but when I move my application to a
Vista machine, the sound does not play...
I used a debug statement to confirm that the files are seen in the code but
somehow it does not play...
If I use the same file in a resource it plays... here is the code used
below:
I ran it through Visual Studio 2005 debugger, and the line
debug.WriteLine(...) shows that the if statement is true but no exceptions
is thrown and the audio does not play.... Help please...
If File.Exists(Path.Combine(Application.StartupPath, VoiceSounds(index)))
Then
Debug.WriteLine("found sound...." & Path.Combine(Application.StartupPath,
VoiceSounds(index)))
My.Computer.Audio.Play(Path.Combine(Application.StartupPath,
VoiceSounds(index)), AudioPlayMode.Background)
End If
Learner...