08-15-2024, 03:19 PM
Thank you sir! I really appreciate you looking into it, and of course, it works now.
Using what you said, I found that this also works.
This has the advantage of allowing it to "bake" and the program can do other things, and periodically check if the audio is ready.
Is this going to be normal behavior moving forward? I don't want to build a work around and have it patched out later.
Using what you said, I found that this also works.
Code: (Select All)
DIM AS STRING sndFile
DIM AS LONG sndH
DIM AS DOUBLE sndL
sndFile = _OPENFILEDIALOG$("Open Sound File", "", "*.mp3|*.ogg|*.wav|*.flac", "Audio files", -1)
IF sndFile <> "" THEN
sndH = _SNDOPEN(sndFile)
IF sndH > 0 THEN
_SNDVOL sndH, .25
PRINT "Waiting for sound to render";
DO
sndL = _SNDLEN(sndH)
PRINT ".";
_DELAY .001
LOOP WHILE sndL = 0
PRINT
_SNDPLAY sndH
PRINT "File:"; sndFile
PRINT "Sound Handle:"; sndH
PRINT "Sound Length:"; sndL
END IF
END IF
This has the advantage of allowing it to "bake" and the program can do other things, and periodically check if the audio is ready.
Is this going to be normal behavior moving forward? I don't want to build a work around and have it patched out later.
2D physics engine https://github.com/mechatronic3000/fzxNGN
Untitled Rouge-like https://github.com/mechatronic3000/Untitled-Rougelike
QB Pool https://github.com/mechatronic3000/QBPool
Untitled Rouge-like https://github.com/mechatronic3000/Untitled-Rougelike
QB Pool https://github.com/mechatronic3000/QBPool