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 Discussion / DarkBASIC's music commands reimplemented

Author
Message
Fluffy Rabbit
User Banned
Posted: 8th Oct 2011 05:49 Edited at: 8th Oct 2011 05:49


The above should undo any problems with DarkBASIC's music commands pausing while looping, not being able to load wav files, and all that.
Latch
14
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 10th Oct 2011 18:28
Nice!

Just a couple of notes about using dlls in DBC that may be helpful:

1. Set up global variables to hold the DLL number that you can easily identify. Also load in your dlls ahead of time if you intend on using them
more than once.

For example, in the case of winmm.dll you might create a global variable in the initialization stage of your program like



2. Once your globals are set and you dlls are loaded, design your functions with a parameter to pass the dll number to the function. This allows you flexibility in assigning whatever number you want to a dll and doesn't hard code it in the function:



In case you want to expand your library or see some of the problems I ran into when messing around with winmm.dll, check out the following link:

Audio DLL

Enjoy your day.
Jocurile copilariei
8
Years of Service
User Offline
Joined: 10th Oct 2011
Location:
Posted: 10th Oct 2011 19:40
hmm ,ya ,really true ,but ..

In timpul liber imi place sa joc multe jocuri cu masini !
Fluffy Rabbit
User Banned
Posted: 10th Oct 2011 23:10 Edited at: 10th Oct 2011 23:10
@Latch-

Quote: "Nice!"


Thank you.

Quote: "Set up global variables to hold the DLL number that you can easily identify. Also load in your dlls ahead of time if you intend on using them more than once."


People generally only use DLL numbers 1, 2, and whatever the greatest DLL number is. If you look at Sparky's or Multisync, the DLL numbers are hard coded. I wouldn't worry about *problems* (for lack of a better word).

Quote: "In case you want to expand your library or see some of the problems I ran into when messing around with winmm.dll, check out the following link:

--snip--
"


You beat me to it! I just knew someone had already implemented this in DBC somewhere, but I just figured I was trumping the Latch.

I guess not.

Login to post a reply

Server time is: 2020-08-15 12:27:37
Your offset time is: 2020-08-15 12:27:37