My app plays sounds when it is running and works fine on my WinXP machines but when I use it on a Win98 machine it doesn't produce any sound.
The sound files (.wavs) are distributed with my app and stored in a folder in the same directory as the .exe
Are there any limitations with using My.Computer.Audio.Play with Win 98

No sound using My.Computer.Audio.Play and Win98
smitprabhu
I can confirm that this problem occurs on Win98 and Me even on a computer with an Athlon 3200 cpu with 1gb ram etc. (so more than powerful enough)
I never found a solution to the problem so I think there is a bug in the .net framework which MS are unlikely to fix seeing as they no longer support the above operating systems, which is a shame as there are people still using these o/s's for whatever reasons.
Disappointed
Simon Smith
the minimum processor requirements for .Net framework 2.0 redistributable is
400 megahertz (MHz)
so i think this is your problem, and not from windows 98, cos .Net framework2.0 and the audio class supports win98
references:
http://msdn2.microsoft.com/en-us/library/ms229070.aspx
http://msdn2.microsoft.com/en-us/library/microsoft.visualbasic.devices.audio.aspx
Eddie Cheung
I have the same problem discussed in this topic. The problem is the same also on a PIII 1Ghz processor. It seems to be a compatibilty issue. Same on Windows ME.
Does anyone solved this issue
Dark Luke
I installed the latest DX and MediaPlayer for Win98 but still no joy
It still looks for c.wav and if I have a wav file named c.wav in the above locations it DOES play that but not the windows sound it is supposed to be playing.
Is it a bug
Adam Singer MSFT
Is anyone able to confirm if the above code works on a Win98 machine
Peelio
Hi Jim,
I used FileMon as you suggested (thanks for pointing it out) and here are the relevant results when I click the button in my app.
911 5:23:39 PM Windowsa:FFFBB307 Attributes C:\WINDOWS\MEDIA\CHIMES.WAV SUCCESS GetAttributes
912 5:23:39 PM Windowsa:FFFBB307 Open C:\WINDOWS\MEDIA\CHIMES.WAV SUCCESS OPENEXISTING READONLY DENYNONE
913 5:23:39 PM Windowsa:FFFBB307 Seek C:\WINDOWS\MEDIA\CHIMES.WAV SUCCESS Beginning Offset: 0 / New offset: 0
914 5:23:39 PM Windowsa:FFFBB307 Read C:\WINDOWS\MEDIA\CHIMES.WAV SUCCESS Offset: 0 Length: 8192
915 5:23:39 PM Windowsa:FFFBB307 Seek C:\WINDOWS\MEDIA\CHIMES.WAV SUCCESS Beginning Offset: 55728 / New offset: 55728
916 5:23:39 PM Windowsa:FFFBB307 Read C:\WINDOWS\MEDIA\CHIMES.WAV SUCCESS Offset: 55728 Length: 8192
917 5:23:39 PM Windowsa:FFFBB307 Read C:\WINDOWS\MEDIA\CHIMES.WAV SUCCESS Offset: 55776 Length: 8192
918 5:23:39 PM Windowsa:FFFBB307 Close C:\WINDOWS\MEDIA\CHIMES.WAV SUCCESS CLOSE_FINAL
919 5:23:39 PM Windowsa:FFFBB307 Attributes C:\WINDOWS\LOCAL SETTINGS\APPS\2.0\KELXEW67.ZMN\QK6BBCAT.A3D\WIND..TION_42AED2A7A915EAB0_0001.0000_9F2FD43D2348D169\C.WAV NOTFOUND GetAttributes
920 5:23:39 PM Windowsa:FFFBB307 Attributes C:\WINDOWS\SYSTEM\C.WAV NOTFOUND GetAttributes
921 5:23:39 PM Windowsa:FFFBB307 Attributes C:\WINDOWS\C.WAV NOTFOUND GetAttributes
922 5:23:39 PM Windowsa:FFFBB307 Attributes C:\WINDOWS\C.WAV NOTFOUND GetAttributes
923 5:23:39 PM Windowsa:FFFBB307 Attributes C:\WINDOWS\COMMAND\C.WAV NOTFOUND GetAttributes
924 5:23:39 PM Windowsa:FFFBB307 Attributes C:\WINDOWS\SYSTEM32\C.WAV NOTFOUND GetAttributes
I don't pretend to understand what it all means so I hope you can help me out
I noticed in the last 6 lines there's a reference to c.wav What's that all about
Lee
ken handzik
There are no limitations on using these functions on any computer with the .NET framework 2.0 installed on them.
Do other sounds work fine on the Windows 98 machine - its not something as simple as the sound drivers arent setup correctly or mute is on on this machine.
SoniaJulka
Thanks for replying.
Other sounds are working fine.
I've just made a very simple app with 1 button and this code in the click event:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
My.Computer.Audio.Play("C:\Windows\Media\chord.wav", AudioPlayMode.Background)
End Sub
Installed it on my Win98 machine and still don't get any sound !
but this is impractical for my application.
If I add the .wavs as a resource and then try them it works fine
I was wondering if the specs of my Win98 laptop had anything to do with it - it's a 300Mhz PII with 128MB ram
prinso
It appears that it is able to locate the sound file. I suspect that the mechanism that .Net uses to play sounds may not be installed on Win98. I'm not sure if it uses media player or direct x under the covers. It does indeed look like it is trying to find a c.wav file. I'm not sure why. The multiple lines show windows running through the known paths to try to find the file.
Jim Wooley
http://devauthority.com/blogs/jwooley/default.aspx
vishal dedhia
How are you deploying the app to the Win 98 box It is possible you are hitting a code-access-security block, either in the file IO or less likely from your description due to unmanaged code. You may want to try using FileMon from SysInternals to make sure it is accessing the file. Also, you may want to check out the System.Media.SoundPlayer.LoadAndPlay method using Reflector to see the CAS checks that are being made.
Jim Wooley
http://devauthority.com/blogs/jwooley/default.aspx