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.

Dark GDK / dbPlaySound... how does it work?

Author
Message
Fr4gory
19
Years of Service
User Offline
Joined: 13th Nov 2005
Location:
Posted: 7th Apr 2009 19:29
I can't get the music to play, I used this code:



I don't get any errors, there's just no music playing, i made sure the music is in the right directory, etc.

I probably used the command wrong, let me know

thank you

Michel Cilissen - CiliSoft Software Solutions
michel@techblog24.com - http://www.cilisoft.tk
AlexI
19
Years of Service
User Offline
Joined: 31st Dec 2004
Location: UK
Posted: 7th Apr 2009 20:18 Edited at: 7th Apr 2009 20:19


The play sound is in the main loop so it will keep trying to play it but you will never hear it because it only plays the first millisecond then restarts again.

Try this:



Tap space, when you let go it should play

DaddyJ
15
Years of Service
User Offline
Joined: 17th Mar 2009
Location:
Posted: 7th Apr 2009 22:35
or you can just check for it

if (dbMusicPlaying(1)!=1)
{
dbPlaySound(1);
}


That way it doesnt restart every loop!
AlexI
19
Years of Service
User Offline
Joined: 31st Dec 2004
Location: UK
Posted: 7th Apr 2009 23:57
more simple is to call dbLoopMusic before the main loop

157488
15
Years of Service
User Offline
Joined: 6th Apr 2009
Location:
Posted: 8th Apr 2009 00:14
thanks alot, got it working now

I used



And placing the dbPlaySound in the main loop was just stupid of me, sorry :p
Fr4gory
19
Years of Service
User Offline
Joined: 13th Nov 2005
Location:
Posted: 8th Apr 2009 00:17 Edited at: 8th Apr 2009 00:36
sorry posted that previous post by "157488" while a mate of me was still loged into my computer :p

Michel Cilissen - CiliSoft Software Solutions
michel@techblog24.com - http://www.cilisoft.tk

Login to post a reply

Server time is: 2024-11-25 14:57:53
Your offset time is: 2024-11-25 14:57:53