This plugin serves as a possible replacement for the sound and music plugins that come with DarkBASIC Professional. Below is a list of audio formats supported:
- Ogg Vorbis
- MP3
- FLAC
- WAV (uncompressed)
- AIFF
- MOD
- S3M
- XM
- IT
In addition to these formats I have also provided custom made Trigger Zones to use with your loaded audio files. These act as a way to enhance your game and provide control over sounds that are heard throughout your game levels and maps. This plugin would not have been possible without Audiere, and I would like to thank the author for creating a great library and for keeping it free. I have also decided to keep my plugin free.
Updates
Since v1.50 there have been various internal code updates, and also improvements that take away the need to delete audio that is loaded during runtime. If you happen to forget to delete a reference before exiting the plugin will take of removing the reference in memory for you and the program will exit normally without causing any hang-ups.
Command List
LOAD AUDIO audio index number, filename
DELETE AUDIO audio index number
PLAY AUDIO audio index number
STOP AUDIO audio index number
PAUSE AUDIO audio index number
RESUME AUDIO audio index number
LOOP AUDIO audio index number
AUDIO VOLUME audio index number, volume (integer ranging from 0 to 100)
*NOTE: volume 0.0 = silence, 1.0 = maximum volume (default)
AUDIO PAN audio index number, pan (float)
*NOTE: pan -1.0 = left, 0.0 = center (default), 1.0 = right
AUDIO PITCH SHIFT audio index number, pitch shift (float)
*NOTE: pitch shift range 0.5 to 2.0
GET AUDIO VOLUME audio index number (returns float)
GET AUDIO PAN audio index number (returns float)
GET AUDIO PITCH SHIFT audio index number (returns float)
AUDIO PLAYING audio index number (returns true or false)
AUDIO SEEKABLE audio index number (returns true or false)
AUDIO LENGTH audio index number (returns number of frames in the streaming sound or returns 0 for not seekable)
AUDIO POSITION audio index number (returns current position in frames)
AUDIO SET POSITION audio index number, position
AUDIO USE DEVICE device (1 = winmm, 2 = DirectSound)
AUDIO EXIST audio index number (returns true or false)
SET AUDIO TRIGGER ZONE trigger index, audio index, trigger x, trigger y, trigger z, height, width, depth, trigger type
*NOTE: Trigger Types,
1 = Play sound when trigger entered, stops when trigger exited.
2 = Play sound when trigger entered, keeps playing till done even if the trigger area is exited.
3 = Plays sound only once.
4 = Loops sound when trigger entered, stops sound when trigger exited.
CHECK AUDIO TRIGGER ZONE trigger index, current x position, current y position, current z position
AUDIO WHITE NOISE audio index number
AUDIO PINK NOISE audio index number
AUDIO RESET PLAYED trigger index number
Installation
- Before installing this plugin you will need to uninstall or remove the previous version to prevent conflicts.
- When choosing the directory for installation remember that the install path must be your dbpro root directory, for example:
"C:Program Files\The Game Creators\DarkBASIC Professional"
Download
Click this link to download the plugin.
If you find any bugs or have any problems, please reply to this post with detailed information or drop me an email, support@blackgate.us.