PlaySound

Discussions related to sound, music, video and other multimedia applications
svrsig
Posts: 2
Joined: Mon 19 Sep 2022, 19:10

PlaySound

Post by svrsig »

The following programme segment works in BB4W 5.95a on Windows 7 (plays a
looping sound for 2s then terminates) but just keeps silemt on BB4w
6.16a on Windows 11 and gives STOP at line 30 (no sound playing). In either
case double clicking on the WAV file itself plays it OK.

In a strange twist - if I add *both* the lines
2 SYS "PlaySound","SystemStart",0,&10001
4 DIM mbuf% 4000000
then the sound does play on Windows 11.

10 SYS "PlaySound","C:\\windows\media\ringout.WAV", 0, 1+8
20 SYS "PlaySound",0,0,&10 TO t%
30 IF t% THEN STOP : REM no sound is playing
40 WAIT 20
50 SYS "PlaySound",0,0,1

Can you elucidate please?

I have an app that makes extensive use of PlaySound and is now silent ...
User avatar
JeremyNicoll
Posts: 93
Joined: Sun 26 Jul 2020, 22:22
Location: Edinburgh

Re: PlaySound

Post by JeremyNicoll »

Why is there a double backslash in the filepath in line 10 ?