Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bug in _SNDOPEN (fixed in v3.14.1)
#1
Is it possible that there is a limit on the $EMBED or _EMBEDDED$?
When I have loaded some sounds, I get a repeat of the first or second sound. I can never play them all.

Example below where 5 different MP3 files are read. But the same sounds are played.
Can you test it? I am using the latest version, so the 3.14 of QB-PE.
In the example you choose 5 MP3 files yourself.


Code: (Select All)
$EMBED:'D:\Sound\Sound-1.MP3','SOUND1'
$EMBED:'D:\Sound\Sound-2.MP3','SOUND2'
$EMBED:'D:\Sound\Sound-3.MP3','SOUND3'
$EMBED:'D:\Sound\Sound-4.MP3','SOUND4'
$EMBED:'D:\Sound\Sound-5.MP3','SOUND5'

'DIM handles
DIM SHARED SND1&, SND2&, SND3&, SND4&, SND5&

DIM Gedaan AS INTEGER
Gedaan = 0

'LOAD the music files
SND1& = _SNDOPEN(_EMBEDDED$("SOUND1"), "MEMORY")
SND2& = _SNDOPEN(_EMBEDDED$("SOUND2"), "MEMORY")
SND3& = _SNDOPEN(_EMBEDDED$("SOUND3"), "MEMORY")
SND4& = _SNDOPEN(_EMBEDDED$("SOUND4"), "MEMORY")
SND5& = _SNDOPEN(_EMBEDDED$("SOUND5"), "MEMORY")

'Simple menu
DO
    PRINT "1 = sound 1"
    PRINT "2 = sound 2"
    PRINT "3 = sound 3"
    PRINT "4 = sound 4"
    PRINT "5 = sound 5"
    PRINT
    PRINT "ESC = END"
    a$ = INPUT$(1)

    IF a$ = CHR$(27) THEN Gedaan = 1

    IF a$ = "1" THEN
        IF SND1& THEN _SNDPLAY SND1&
    END IF

    IF a$ = "2" THEN
        IF SND2& THEN _SNDPLAY SND2&
    END IF

    IF a$ = "3" THEN
        IF SND3& THEN _SNDPLAY SND3&
    END IF

    IF a$ = "4" THEN
        IF SND4& THEN _SNDPLAY SND4&
    END IF

    IF a$ = "5" THEN
        IF SND5& THEN _SNDPLAY SND5&
    END IF

LOOP UNTIL Gedaan = 1

'END program
_SNDCLOSE SND1&
_SNDCLOSE SND2&
_SNDCLOSE SND3&
_SNDCLOSE SND4&
_SNDCLOSE SND5&
SYSTEM
Reply


Messages In This Thread
Bug in _SNDOPEN (fixed in v3.14.1) - by BDS107 - 08-25-2024, 03:56 PM



Users browsing this thread: 1 Guest(s)