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.

Music & Sound FX / dbLoadSound

Author
Message
Kilrath
15
Years of Service
User Offline
Joined: 18th Jan 2009
Location: Alberta
Posted: 19th Jan 2009 02:51
so i tried to use the sound functions of the DarkGDK but no use so far. I can run a MP3 easy enough but here is what i do.

dbLoadSound("collision.wav", 10);
dbPlaySound( 10 );

If i did this my animated sprite would not work. but my animated sprite is loaded into slot 3 not 10. So i added a check to make sure it exists before attempting to play.

if (dbSoundExists( 10 ))
dbPlaySound(10);

now all sprites work fine but the sound does not play. I downloaded a WAV editor and saved to a new name thinking maybe my type of WAV was wrong.... still no good. The sound will not load or play.

Saving the world, one bit at a time.... Wait it's not worth saving. Get your own bits!
Grandma
18
Years of Service
User Offline
Joined: 26th Dec 2005
Location: Norway, Guiding the New World Order
Posted: 19th Jan 2009 09:06
Perhaps you call the dbPlaySound(10); every loop so that it just appears like it doesn't play, because it gets "replayed" every frame and thus doesn't have the chance to become audible. Hard to tell with only that code to go by.

This message was brought to you by Grandma industries.

Making yesterdays games, today!
Kilrath
15
Years of Service
User Offline
Joined: 18th Jan 2009
Location: Alberta
Posted: 19th Jan 2009 15:09 Edited at: 19th Jan 2009 15:41
no what happens is when something collides with the ship it hides the ship sprite, displays an explosion and is supposed to play the sound. if i dont check if it exists before attempting to play it the explosion sprite wont display.if i put in the check it just doesnt play.



Saving the world, one bit at a time.... Wait it's not worth saving. Get your own bits!
Rudolpho
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 19th Jan 2009 19:23
Try out a smaller code using only what appears to be faulty to see whether it only fails in your current project (in which case you have probably done something wrong yourself) or if it will not work no matter which circumstances (in which case there would be something wrong with the library).

Try something like this:



-> Oh, come on...
Kilrath
15
Years of Service
User Offline
Joined: 18th Jan 2009
Location: Alberta
Posted: 20th Jan 2009 05:59
nope even a new project refuses to play sound....

Saving the world, one bit at a time.... Wait it's not worth saving. Get your own bits!
Kilrath
15
Years of Service
User Offline
Joined: 18th Jan 2009
Location: Alberta
Posted: 20th Jan 2009 20:09
well i uninstalled and reinstalled DarkGDK and tried again. no go on the sound... i tried 5 different wav files.... wierd

Saving the world, one bit at a time.... Wait it's not worth saving. Get your own bits!

Login to post a reply

Server time is: 2024-04-25 10:22:34
Your offset time is: 2024-04-25 10:22:34