PLAYMUSIC looping and detect playing?

Previous topic - Next topic

AndyH

Is it possible to force music to loop.  I've just started testing this today, playing an MP3.  It will play once then stop.

Also, is it possible to detect if music is playing like the SOUNDPLAYING() function?


If not can the above be added?

PeeJay

Funnily enough, Andy, I was just coming on the forum to suggest adding LOOPMUSIC myself :D
www.peejays-remakes.co.uk
For games, remakes, and GL Basic Tutorials
Artificial Intelligence is no match for Natural Stupidity

Schranz0r

using fmod.dll to do that....
but windows only :/
I <3 DGArray's :D

PC:
AMD Ryzen 7 3800X 16@4.5GHz, 16GB Corsair Vengeance LPX DDR4-3200 RAM, ASUS Dual GeForce RTX™ 3060 OC Edition 12GB GDDR6, Windows 11 Pro 64Bit, MSi Tomahawk B350 Mainboard

AndyH

Thanks Schranz0r, I'm looking for something that will work on windows, PocketPC and GP2X though.

PeeJay

Should be easy to implement - all it needs it to compare the time the music has been playing against the internal clock - but, like Andy, I think it would be nice to include it as part of the language
www.peejays-remakes.co.uk
For games, remakes, and GL Basic Tutorials
Artificial Intelligence is no match for Natural Stupidity

Kitty Hello

It doesn't loop? ~*$%&!!!!!
I go definitely insane with that music function...

Ian Price

It used to loop, but doesn't now. :(

[EDIT] While we're on the subject of music, is there any chance of getting .MOD/.IT/.XM etc. tracker music to play in future updates?
I came. I saw. I played.

Kitty Hello

Use the fmod dll. There's a wrapper for it.
On GP2X it *might* work out of the box, since I use SDL_Mixer for music.
Fixed that loop, bug, btw.

Ian Price

Being a thicky - how do you use the FMOD.DLL? Just #Include it?

Good news about looping :)

Cheers.
I came. I saw. I played.

Kitty Hello

In Samples/_Projects_/FMod is a sample program and a fmod.gbas file. Just include it to your project and place the fmod.dll side by side with the game's .exe.

Ian Price

I came. I saw. I played.