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 Discussion / Final EXE music problem

Author
Message
Insert Name Here
19
Years of Service
User Offline
Joined: 20th Mar 2007
Location: Worcester, England
Posted: 20th Jun 2007 18:57
I've made a game which has more than one peice of music in it, but whenever I run the game as a final executable it only plays the one peice of music in the place of two other peices of music. Using a normal souce not included exe works fine, it's ust the final that is the problem. If anyone has a solution please tell me.
Thanks.

The below sentance is true.
The above sentance is false.
Paradox!
TDK
Retired Moderator
23
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 20th Jun 2007 20:42
It depends on how you've written it as there are a number of different ways to do it.

What do your load command lines say? Are you loading them all into memory at the start or loading them as they are needed? Are you selecting them to play/load randomly?

So, here's a few suggestions which may or may not apply:

* Make sure the music files are in the same directory as the .DBA file, (changing the LOAD command lines so they just have the filename in it and no path).

* Try using only one memory slot and re-use it by loading the next song into it when required. I've had problems before with something similar to this but I can't remember exactly what it was.

You can do:

Load Music "Filename1.mp3",1
Load Music "Filename2.mp3",2
Load Music "Filename3.mp3",3

Play Music 1

when finished...

Play Music 2

when finished...

Play Music 3


... or select the numbers randomly.

Or, you can do this:

Load Music "Filename1.mp3",1
Play Music 1

when finished...

Load Music "Filename2.mp3",1
Play Music 1


...and so on.

The problem is that I can't remember which one had the problem and which one I subsequently used!

Either way, you are better off not having the song files in sub-folders.

TDK_Man

heartbone
23
Years of Service
User Offline
Joined: 9th Nov 2002
Location:
Posted: 21st Jun 2007 17:43
Independent verification of TDK's solution:

I'm unique, just like everybody else.
Insert Name Here
19
Years of Service
User Offline
Joined: 20th Mar 2007
Location: Worcester, England
Posted: 21st Jun 2007 20:45
Thanks for your help.
I accidentally deleted my dba file, so I can only use a normal exe now anyway, but thanks anyway.

The below sentance is true.
The above sentance is false.
Paradox!

Login to post a reply

Server time is: 2026-07-06 01:20:27
Your offset time is: 2026-07-06 01:20:27