How to use IsSound()
Posted: Sat Dec 30, 2023 6:15 pm
Code: Select all
InitSound()
Procedure Loading(Type, Filename$, ObjectId)
Debug Filename$ + " loaded (id = " + ObjectId + ")"
; PlaySound(0) ; play the sound
EndProcedure
Procedure LoadingError(Type, Filename$)
Debug Filename$ + ": loading error"
Debug IsSound(0)
Debug IsSound(testsound)
EndProcedure
; Register the loading event before calling any resource load command
BindEvent(#PB_Event_Loading, @Loading())
BindEvent(#PB_Event_LoadingError, @LoadingError())
LoadSound(0, "Data/Lazer.wav") ; Be sure this sound is available (the source file should be saved in the SpiderBasic/Examples drawer)
testsound.i=LoadSound(#PB_Any,"nosound.mp3")
Could it be that Isound() isn't working or what am I doing wrong?
Even though the sound to be loaded does not exist, Issound() shows that the sound is valid and correctly initialized.