IsPlayingMusic, Bug or joke?
Posted: Wed Oct 21, 2020 4:16 pm
I found this strange bug with the instruction IsMusicPlaying and as usual how work a instruction with one system and other.
This time, as you like, a simple and clear code, where the instruction under Windows works in reverse way as to Amiga systems and in theory how does the manual say, in Windows with True and MorphOS&Amiga with False.
In my game project nows I have use both methods, activate it if the executable is for MorphOS&Amiga or if it is for Windows.
But this is not new, is being something habitual some instructions work to different way, sometimes by the operating system and others.........
Code: Select all
@MUSIC 1, "HappyBirthdaySong01.mp3"
PlayMusic(1, 1) ;HappyBirthdaySong01.
Function p_Musica()
playing=IsMusicPlaying(1)
;If playing=True Then TextOut(#CENTER, #CENTER, "Music is End") ;Windows.
If playing=False Then TextOut(#CENTER, #CENTER, "Music is End") ;MorphOS&AmigaOS3.x
EndFunction
InstallEventHandler({OnMusicEnd=p_Musica})
EscapeQuit(False)
Repeat
WaitEvent
Forever
In my game project nows I have use both methods, activate it if the executable is for MorphOS&Amiga or if it is for Windows.
But this is not new, is being something habitual some instructions work to different way, sometimes by the operating system and others.........