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 / Crappy music in windowed mode...

Author
Message
Vues3d on Kalimee
21
Years of Service
User Offline
Joined: 12th May 2004
Location: NYON (SWITZERLAND)
Posted: 30th Sep 2004 17:13
I have a problem that seems to me a bit strange.
When I'm in windowed mode, when I use the mouse, the music breaks & make strange "noise"... If I stop to move the mouse, music is OK again.
I load a mp3 file...

Any idea???

Guido
http://www.vues3d.com
BealziBob
20
Years of Service
User Offline
Joined: 9th Jul 2004
Location: The Grim North (UK)
Posted: 30th Sep 2004 18:27
MP3 files are decompressed and decoded "on the fly". Unlike a WAV file which is simply read and output.

The upshot of this, is that MP3 Files are very processor intensive to play. If you are working your PC hard with graphics, and also making it draw the desktop, It's quite likley that the mouse movements are pushing the processor "over the edge". One of the first things to suffer from lack of processing time, is the decoding routine for MP3 files.

I suggest you try your software out on a different PC and see what happens. Lots of modern Sound cards actually decode MP3 files on thier own, without having to tax the processor, so this should make the differance.

To prove the theory, try running your program with SYNC OFF at the top insetead of SYNC ON. This forces DBPro to use the minimum possible CPU time, and should free up enough CPU to allow clean MP3 decoding.

Hope that helps

OSX Using Happy Dude
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 30th Sep 2004 19:06
It is also possible that your sound card cant duplex properly between DirectX music/sound and Windows...


Come to the UK Convention on the 23rd & 24th of October
Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 30th Sep 2004 19:15
For a game like yours Vue, I'd run it in fullscreen mode with a locked frame rate - it'll run smoother, look better, and it should reduce the load on the mp3 decoder.


Van-B


Muhahahahaha.
Vues3d on Kalimee
21
Years of Service
User Offline
Joined: 12th May 2004
Location: NYON (SWITZERLAND)
Posted: 30th Sep 2004 19:22
Thanx for advices.
In fact at first I was coding the game for a full screen & this way, I have no problems with the music. But I also seen that it's nice to see the game in windowed mode...
Changing the mp3 in wav... isn't a good idea because files will became enormous (30mb for a song... instead of 1)...
So, the only thing is to have the game in full screen mode!

Really thanx to everyone... also because it's not a bad coding, but just a matter of internal processing.

Guido
http://www.vues3d.com

Login to post a reply

Server time is: 2025-06-05 19:13:02
Your offset time is: 2025-06-05 19:13:02