|
-
Nov 7th, 2024, 05:08 PM
#1
Thread Starter
Junior Member
My.Computer.Audio.Play() fails
Hey Everyone,
I cannot get sound working in vb.net. The simplest possible code:
My.Computer.Audio.Play("test.wav", AudioPlayMode.WaitToComplete)
fails silently if test.wav exists, but produces errors if it doesn't. I've tried the following:
- placing the code in form_load
- placing the code on a button
-vs 2019 and vs 2022
-.NET 4.8 and 6.0
- the different versions of VS were on two different computers
- tried a workaround suggested elsewhere involving using SndPlaySoundA in Winmm.dll. That got me a chimes sound rather than silence but still didn't play test.wav.
... and nothing works. The only thing that would seem to be in common would be .NET itself. Does anyone have a clue here? I've been doing audio applications for some time, just got back to working on one and it's completely broken. Help! TIA...
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|