PLAYMUSIC (again!)

Previous topic - Next topic

PeeJay

Please don't kill me Gernot, but I've found another bug! I think this code is pretty self explanatory:

Code (glbasic) Select
PLAYMUSIC "music.mp3"

PRINT "This music loops okay",200,200
SHOWSCREEN

MOUSEWAIT

STOPMUSIC

WHILE MOUSEAXIS(3)
WEND

PLAYMUSIC "music.mp3"

PRINT "This music doesn't loop",200,200
SHOWSCREEN

WHILE MOUSEAXIS(3)=0
WEND

PRINT "But it will restart looping now!",200,200
SHOWSCREEN
SLEEP 5000

END
www.peejays-remakes.co.uk
For games, remakes, and GL Basic Tutorials
Artificial Intelligence is no match for Natural Stupidity

Kitty Hello

Right. You need either: SHOWSCREEN, MOUESWAIT, KEYWAIT or HIBERNATE to loop music. I'm sorry, it's crap, it gave me headache for long time and I'm not willing to look at it again. (Unless you really, really think this is a problem...)

PeeJay

No problem - it should be pretty easy to code my way around it ..... just pop a USEASBMP before the loop, and a SHOWSCREEN in the loop ....
www.peejays-remakes.co.uk
For games, remakes, and GL Basic Tutorials
Artificial Intelligence is no match for Natural Stupidity

Kitty Hello

or hibernate or mousewait (in your special case)

PeeJay

Nah, my "special case" (ie the compo entry) needs a continual loop going (there is some extra stuff going on between the WHILE and the WEND) - but it's all sorted now. I'm even using the "feature" as a feature! (in that I can choose to play a tune once while waiting for a keypress, or get it to loop - the choice is mine :D)
www.peejays-remakes.co.uk
For games, remakes, and GL Basic Tutorials
Artificial Intelligence is no match for Natural Stupidity