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 / Play Sound

Author
Message
Valmerin
16
Years of Service
User Offline
Joined: 30th Nov 2007
Location:
Posted: 1st Dec 2007 05:31
I cant get my program to play music, imlearning db one step at a time

Her i smy code
#include "darkgdk.h"



void DarkGDK (void)
{
dbSetDir ("media\\");

dbSyncOn ( );
dbSyncRate ( 60 );

dbLoadMusic ("music\\rockwellproductions-GOD.mp3",101);
dbSetMusicVolume (1,100);

dbSetDisplayMode ( 800 , 600 , 32 );



while ( LoopGDK ( ) )
{
dbPlayMusic (1);
dbSync ();
}
return;
}
kBessa
17
Years of Service
User Offline
Joined: 8th Nov 2006
Location: Manaus, Amazonas, Brazil
Posted: 1st Dec 2007 06:54
Shouldn't it be like this?

dbLoadMusic ("music\\rockwellproductions-GOD.mp3",1);
RPDan
17
Years of Service
User Offline
Joined: 29th Apr 2007
Location:
Posted: 1st Dec 2007 14:36
Yeah. You are loading music into a number you never use, and you keep trying to call music commands using a music number that hasn't been loaded. Also, Put dbPlayMusic(int); before your main program loop. If you want it to play again when it stops, use dbLoopMusic(int);

Login to post a reply

Server time is: 2024-09-29 05:19:19
Your offset time is: 2024-09-29 05:19:19