Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Music looping problem

Author
Message
Santman
14
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 8th Oct 2011 23:07
Has anyone else had a problem with the "loop music" command? It simply didn't work for me. I've tried the music as an MP3, WAV and WMA and it refused to play it again. The songs appeared to be fine too. I even added a loop to check if the track was playing then play it again if it wasn't, but that still didn't work.

In the end I wrote my own "jukebox" routine anyway to read and monitor the lengths of the songs as it allows me to load and play a new track when one ends, but it was just wondering if I'm just being really stupid???
Daniel wright 2311
User Banned
Posted: 9th Oct 2011 05:32
If musiclooping(1)=0 then play music (1)

my signature keeps being erased by a mod So this is my new signature.
basjak
16
Years of Service
User Offline
Joined: 16th Apr 2010
Location: feel like signing up for mars
Posted: 10th Oct 2011 03:08
I remember I raised this issue before and I agree with you but I don't know why it works on the mp3 files that are supplied by the DBpro game studio.
CumQuaT
AGK Master
16
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Tasmania, Australia
Posted: 10th Oct 2011 09:45
I use loop music at numerous points in my game with no troubles... Are you running the latest version of DBP?

Malevolence: The Sword of Ahkranox
www.msoa-game.com
www.facebook.com/malevolencegame
Rais
23
Years of Service
User Offline
Joined: 7th Jul 2003
Location:
Posted: 10th Oct 2011 14:54
If memory serves, you need to have a 'SYNC' command in you main loop, that will update the music playing command.
Santman
14
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 10th Oct 2011 21:14
Yeah, it's the latest update off here, but it doesn't work. Song ends, then nothing. Tried putting in a "if music playing (1)=0 then play music 1" check too - still nothing no matter what format I encoded it to. No idea.

Anyway thanks for the suggestions, but I wrote my own routine anyway, lets me choose another random track, load it, then commence right away. Working really well.
Daniel wright 2311
User Banned
Posted: 10th Oct 2011 23:51
This is becouse I wrote it all wrong,I was in a rush so my mind was twisted,sorry.

If soundplaying(1)=0 then play sound(1)

I also had this problem myself a long time ago,this is how I fixed it.

my signature keeps being erased by a mod So this is my new signature.

Login to post a reply

Server time is: 2026-07-11 02:55:55
Your offset time is: 2026-07-11 02:55:55