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.

Newcomers DBPro Corner / Music won't loop smoothly, code problem or sound problem?

Author
Message
Gyrich
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location: Here, obviously.
Posted: 16th Jan 2006 11:45 Edited at: 16th Jan 2006 11:48
I have some music looping in the background of my game and when i run the code, there is a very noticeable gap when the loop ends and starts again. I've uploaded my 9 music files for you guys to mess around with if needed, is it a problem with my coding or do i need to find better quality loops?

here's the code too if you need it:



DBPro User
PC: WinXP, AthlonXP 2100+ 1.7ghz, 80gb HD, Nvidia GeForce FX 5200 (128mb onboard RAM), 512mb DDR400 system RAM. Thank you for your help.

Attachments

Login to view attachments
UFO
18
Years of Service
User Offline
Joined: 11th Oct 2005
Location:
Posted: 16th Jan 2006 14:22
Are you sure the gap isn't in any of the music files?


Hippopotomonstrosesquippedaliophobia-Fear of long words
hyrichter
20
Years of Service
User Offline
Joined: 15th Feb 2004
Location: Arizona
Posted: 16th Jan 2006 14:26 Edited at: 16th Jan 2006 14:27
If you're using DBC, it especially had this problem with MIDI files. What you can do is just use the play music command instead of the loop music command. Then in your main loop, just check to see if the music has stopped, and if so, tell it to play again. Example:

Outside your main loop:


Inside the main loop:


I'm not sure how that will work with DBP. But with DBC, that loops a midi without any pause.

Edit: Shoulda looked at your code before. So you're using MP3's, but what I suggested might work with them. Also, the problem may be with your music.

Login to post a reply

Server time is: 2024-09-24 13:34:15
Your offset time is: 2024-09-24 13:34:15