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 / music problems

Author
Message
TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 30th May 2009 13:18
Hello!

If you download the attachment, you will find 2 music files (intro.wma and music.wma) and a dba file.

What the program is supposed to do is load the music, then play the intro, and then play the music straight after the intro. Then, when that music is finished, play it again.

But my problem is, that the music stops, and lags a bit when switching, and you notice that the next music has started. How can I stop that jump and really not here the music switch?

Here's the code:



I load the main music twice, because if I use "loop music" the gap takes longer.

TheComet


Make the path of your enemies easier with Waypoint Pro!
Libervurto
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 30th May 2009 17:52
have you tried using the sound command instead.
I remember having loads of problems with music.

There is an eight letter word. You can insert a letter into it or remove a letter from it without changing its meaning. Answer
BN2 Productions
21
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 30th May 2009 21:42
If you have lag between the music, you could try anticipating it and playing the second song just before the first one ends.

Great Quote:
"Time...LINE??? Time isn't made out of lines...it is made out of circles. That is why clocks are round!" -Caboose
Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 31st May 2009 00:33 Edited at: 31st May 2009 00:38
Also if the actual sound of your music files doesn't start at time=0:00:00 then you'll hear the empty space. And if you loop it, if the sound stops before the time length of the file, then you'll also hear the empty space at the end - increasing the seeming lag.

Use Obese's suggestion to use sound instead of music. You can even control the playback start position with the sound command.

And, perhaps, wma is a compressed format. It may have to be uncompressed every time it is played so it lags in between playing with the music command.

Enjoy your day.
TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 31st May 2009 12:27
wma is compressed and not lossy. I made it with windows movie maker, and the format will only load with "load music", but it can not load it as a sound.

If I convert it to something that can be loaded as a sound(I have), it adds some space at the start and the end...

Does anyone know a converting program that does not add space at the start or the end?

TheComet


Make the path of your enemies easier with Waypoint Pro!
Yodaman Jer
User Banned
Posted: 1st Jun 2009 20:51
I usually trim the empty space of my .mp3 files in my movie editor, then re-save them. It works pretty well!


"If you want lots of people to play your game make it simple; lots of people are simple." -Obese87
TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 1st Jun 2009 21:28
Which movie editor? Is it the Windows Movie Maker?

TheComet


Make the path of your enemies easier with Waypoint Pro!
Yodaman Jer
User Banned
Posted: 1st Jun 2009 22:01
You can use whatever movie editing software you want. I think you can export to .mp3 with WMM, but I'm not certain. I personally use Sony Vegas Movie Studio 8.


"If you want lots of people to play your game make it simple; lots of people are simple." -Obese87
spt games
16
Years of Service
User Offline
Joined: 14th Apr 2009
Location: United Kingdom
Posted: 2nd Jun 2009 17:08
@TheComet

If you have a WAV version or a very high bit-rate MP3 - perhaps you could load it into Audacity, trim the "silence" at the start and end and then save the new version as another WAV.

Audacity doesn't support exporting WMA, so you would need to use a WAV to WMA converter to do that for you.
TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 4th Jun 2009 17:42
That might work! Thanks, spt games!

TheComet


Make the path of your enemies easier with Waypoint Pro!
spt games
16
Years of Service
User Offline
Joined: 14th Apr 2009
Location: United Kingdom
Posted: 6th Jun 2009 00:11
No problem

Login to post a reply

Server time is: 2025-05-15 07:21:42
Your offset time is: 2025-05-15 07:21:42