Author Topic: PLAYMUSIC looping and detect playing?  (Read 4637 times)

Offline AndyH

  • Dr. Type
  • ****
  • Posts: 383
    • View Profile
    • http://www.ovine.net/
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?

Offline PeeJay

  • Mr. Polyvector
  • ***
  • Posts: 244
    • View Profile
    • PeeJays Remakes
PLAYMUSIC looping and detect playing?
« Reply #1 on: 2008-Jan-28 »
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

Offline Schranz0r

  • Premium User :)
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 5073
  • O Rly?
    • View Profile
PLAYMUSIC looping and detect playing?
« Reply #2 on: 2008-Jan-28 »
using fmod.dll to do that....
but windows only :/
I <3 DGArray's :D

PC:
AMD Ryzen 7 1700 @3.9GHz, 16GB HyperX Fury 3000MHz Ram, ASUS ROG GTX 1060 STRIX 6GB, Windows 10 Pro 64Bit, MSi Tomahawk B350 Mainboard

Offline AndyH

  • Dr. Type
  • ****
  • Posts: 383
    • View Profile
    • http://www.ovine.net/
PLAYMUSIC looping and detect playing?
« Reply #3 on: 2008-Jan-28 »
Thanks Schranz0r, I'm looking for something that will work on windows, PocketPC and GP2X though.

Offline PeeJay

  • Mr. Polyvector
  • ***
  • Posts: 244
    • View Profile
    • PeeJays Remakes
PLAYMUSIC looping and detect playing?
« Reply #4 on: 2008-Jan-28 »
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

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10757
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
PLAYMUSIC looping and detect playing?
« Reply #5 on: 2008-Jan-28 »
It doesn't loop? ~*$%&!!!!!
I go definitely insane with that music function...

Offline Ian Price

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 4159
  • On the shoulders of giants.
    • View Profile
    • My Apps
PLAYMUSIC looping and detect playing?
« Reply #6 on: 2008-Jan-29 »
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.

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10757
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
PLAYMUSIC looping and detect playing?
« Reply #7 on: 2008-Jan-29 »
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.

Offline Ian Price

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 4159
  • On the shoulders of giants.
    • View Profile
    • My Apps
PLAYMUSIC looping and detect playing?
« Reply #8 on: 2008-Jan-29 »
Being a thicky - how do you use the FMOD.DLL? Just #Include it?

Good news about looping :)

Cheers.
I came. I saw. I played.

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10757
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
PLAYMUSIC looping and detect playing?
« Reply #9 on: 2008-Jan-30 »
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.

Offline Ian Price

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 4159
  • On the shoulders of giants.
    • View Profile
    • My Apps
PLAYMUSIC looping and detect playing?
« Reply #10 on: 2008-Jan-30 »
Cheers Gernot :)
I came. I saw. I played.