Program Announcements / DarkBASIC Enhanced Audio Plugin |
| Author | Message | ||
|
Torrey
User Joined: Fri Aug 20th 2004 Location: Ohio |
I'm proud to present the DarkBASIC Enhanced Audio Plugin. Media capabilities include playing Ogg Vorbis, MP3, FLAC, WAV (uncompressed), AIFF, MOD, S3M, XM, and IT files. Extra features include the use of 3D world Trigger Zones with audio that you load into your game. The command list (plus parameters) are included below for reference: 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 (float) *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: DarkBASIC_EAP_15.exe - This is the automatic installation file. Very simple to use installer, and was tailored to work with users that have DarkBASIC Pro installed on their computer. audiodll.zip - This archive is for users that cannot use the above installer and need to manually install the plugin onto their pc. Instructions for a manual install: audiodll.ini - Add this file to your keywords folder. audiodll.dll - Add this file to your plugins-user folder. Documentation was not provided in the installation files because of the simplicity of this plugin. Should the need arise for documentation or source code examples, I can release patch updates for this plugin. I am currently looking into exanding this plugin to include features for saving/creating various audio formats. Any suggestions for development are welcomed as well! Enjoy! The best audio plugin for DarkBASIC Pro! Plays Ogg Vorbis,MP3,FLAC,uncompressed WAV,AIFF,MOD,S3M,XM,and IT files. |
||
| Back to top |
|||
|
D Man
User Joined: Thu Oct 3rd 2002 Location: Germany |
Now that's really useful! Great job so far, you're making fmod useless, replacing it with an better alternative Tough, I've got one suggestion... how about commands for determining if some instrument got played since last time this command was called (of course, only for those tracker formats). This would be absolute perfect for getting the beats of a song. You could also include some sort of spectral analysis, but like I said, these are only suggestions Great work. God is real, unless declared integer. |
||
| Back to top |
|||
|
Torrey
User Joined: Fri Aug 20th 2004 Location: Ohio |
Quote: "Now that's really useful!
Great job so far, you're making fmod useless, replacing it with an better alternative . Tough, I've got one suggestion... how about commands for determining if some instrument got played since last time this command was called (of course, only for those tracker formats). This would be absolute perfect for getting the beats of a song. You could also include some sort of spectral analysis, but like I said, these are only suggestions . Great work." FMOD is really one of a kind, hard to replace that. Only thing I wish about that project was that it was open source, and not so expensive for a commerical license. I think in your first suggestion you were mentioning something like a counter? That's easily implemented, but what would the use of it be? There is something kind of like it in the Trigger Zone functions where in type 3 it checks if the audio was previously played. Spectral analysis might be a little tough for me, so I might have to wait on that one. The best audio plugin for DarkBASIC Pro! Plays Ogg Vorbis,MP3,FLAC,uncompressed WAV,AIFF,MOD,S3M,XM,and IT files. |
||
| Back to top |
|||
|
BatVink
TGC Newsletter Editor ![]() ![]() Joined: Fri Apr 4th 2003 Location: Chilling |
|
||
| Back to top |
|||
|
Torrey
User Joined: Fri Aug 20th 2004 Location: Ohio |
Quote: "Looks excellent, especially with position commands. When I get teh time, I might have a play."
Thanks for compliment! Just for reference to you, I think I saw some place 75 frames equals 1 second of audio. The position commands seek in frames. The best audio plugin for DarkBASIC Pro! Plays Ogg Vorbis,MP3,FLAC,uncompressed WAV,AIFF,MOD,S3M,XM,and IT files. |
||
| Back to top |
|||
|
Torrey
User Joined: Fri Aug 20th 2004 Location: Ohio |
A user requested the command "AUDIO EXIST" to be added. The command was added to the plugin, and the download links above were updated. The best audio plugin for DarkBASIC Pro! Plays Ogg Vorbis,MP3,FLAC,uncompressed WAV,AIFF,MOD,S3M,XM,and IT files. |
||
| Back to top |
|||
|
geecee3
User Joined: Wed Feb 25th 2004 Location: edinburgh.scotland. |
awesome torrey, pure awesome. thanks a lot my good man. grant. Ohd Chinese Ploverb say : Wise Eskimo, not eat yerrow snow. |
||
| Back to top |
|||
|
Thebeely
User Joined: Wed May 4th 2005 Location: Croatia |
Thanks a lot, Torrey. I'm not really smart... |
||
| Back to top |
|||
|
Torrey
User Joined: Fri Aug 20th 2004 Location: Ohio |
Quote: "awesome torrey, pure awesome. thanks a lot my good man.
Glad you like it, thanks for checking it out!grant." Quote: "Thanks a lot, Torrey."
No problem.The best audio plugin for DarkBASIC Pro! Plays Ogg Vorbis,MP3,FLAC,uncompressed WAV,AIFF,MOD,S3M,XM,and IT files. |
||
| Back to top |
|||
|
##GERI##
User Joined: Fri Aug 12th 2005 Location: HUN |
this is for dbpro only? http://LegendgrafiX.tk |
||
| Back to top |
|||
|
Torrey
User Joined: Fri Aug 20th 2004 Location: Ohio |
Quote: "this is for dbpro only?"
Yes it was tailored for DarkBASIC Professional, but if you have a strong will to use it, it's very possible. The commands and the APIs are pretty simple to compare and figure out which API need to be called for it to work.The best audio plugin for DarkBASIC Pro! Plays Ogg Vorbis,MP3,FLAC,uncompressed WAV,AIFF,MOD,S3M,XM,and IT files. |
||
| Back to top |
|||
|
Thebeely
User Joined: Wed May 4th 2005 Location: Croatia |
I don't want to bother again, but is there any possibility to make "pause" & "resume" commands? I can try to make it with "stop", but that isn't that... Please try (I REALLY believe you can make it lol) if it isn't much trouble for You... I'm not really smart... |
||
| Back to top |
|||
|
CPU
User ![]() Joined: Fri Jul 4th 2003 Location: On your motherboard! |
Sorta off the subject a little, but how would I go about adding it into a Dark SDK project? I'd like to be able to use it in a project I'm working on but I'd don't know how I'd go about adding it to a SDK project with just the dll, I'm still a littl green when it comes to these sort of things. Thanks! CPU K-OS Battlefields
IS ///---///---///---UNDER CONSTRUCTION---\\\---\\\---\\\ |
||
| Back to top |
|||
|
Torrey
User Joined: Fri Aug 20th 2004 Location: Ohio |
Quote: "I don't want to bother again, but is there any possibility to make "pause" & "resume" commands?
I can try to make it with "stop", but that isn't that... Please try (I REALLY believe you can make it lol) if it isn't much trouble for You..." I will work on this very soon. As of right now if you stop the audio playing it actually pauses it. With the new change coming up I will make the stop command reset the audio to the beginning, and add the two needed commands. [edit] Both file links above were updated with the new pause and resume commands. Quote: "Sorta off the subject a little, but how would I go about adding it into a Dark SDK project? I'd like to be able to use it in a project I'm working on but I'd don't know how I'd go about adding it to a SDK project with just the dll, I'm still a littl green when it comes to these sort of things.
Thanks! CPU" I will look into this and distribute the .lib and .h file you can use with your DarkSDK projects. This will take me a little bit more time then the above request by Mean Mashine. This package you request will have its own seperate installer. The installer will check your system for MSVC 6, and install in the proper directories so it's easier to add to your projects as well. The best audio plugin for DarkBASIC Pro! Plays Ogg Vorbis,MP3,FLAC,uncompressed WAV,AIFF,MOD,S3M,XM,and IT files. |
||
| Back to top |
|||
|
CPU
User ![]() Joined: Fri Jul 4th 2003 Location: On your motherboard! |
Torry - You rock! Thanks... CPU K-OS Battlefields
IS ///---///---///---UNDER CONSTRUCTION---\\\---\\\---\\\ |
||
| Back to top |
|||
|
DarkPhear
User Joined: Wed Oct 15th 2003 Location: Brazil |
This is a great plugin. But can I use it in my commercial game? Download free games and demos at my page: http://darkphear.cjb.net MultiJoy Plugin : use multiple joysticks / joypads in your program.http://darkphear.cjb.net |
||
| Back to top |
|||
|
Torrey
User Joined: Fri Aug 20th 2004 Location: Ohio |
Quote: "This is a great plugin. But can I use it in my commercial game?"
Sure, add me to the credits. Are you going to be using this the same way CPU is with C++ and are waiting for me to release the lib and include file? Or you're doing a commerical game in dbpro? The best audio plugin for DarkBASIC Pro! Plays Ogg Vorbis,MP3,FLAC,uncompressed WAV,AIFF,MOD,S3M,XM,and IT files. |
||
| Back to top |
|||
|
DarkPhear
User Joined: Wed Oct 15th 2003 Location: Brazil |
Then I must say your plugin is perfect. Next year I'll actually release a commercial game made in DBPRO (with a couple of C++ DLLs). Thanks you Torrey, of course your name will be on the credits. Download free games and demos at my page: http://darkphear.cjb.net MultiJoy Plugin : use multiple joysticks / joypads in your program.http://darkphear.cjb.net |
||
| Back to top |
|||
|
DarkPhear
User Joined: Wed Oct 15th 2003 Location: Brazil |
Oops, found a bug dude. If I delete the audio and try load another one using the same index number it crashes: DBP_PROGRAM causou uma falha de página inválida no módulo AUDIODLL.DLL em 018f:020d209c. Registros: EAX=02284b20 CS=018f EIP=020d209c EFLGS=00010202 EBX=00000001 SS=0197 ESP=00f4f434 EBP=00f4f468 ECX=00000008 DS=0197 ESI=0214ca78 FS=652f EDX=bffc9490 ES=0197 EDI=00000001 GS=0000 Bytes em CS:EIP: ff 51 04 c7 06 00 00 00 00 5e c3 90 90 90 90 90 Esvaziamento da pilha: 02284b20 00000004 0211b0b9 00000001 02280c54 00000001 00000000 00f4f444 00f4f264 00f4f678 0211e2ac 021334b8 00000000 00f4f4c0 020d10a6 0214ca78 Download free games and demos at my page: http://darkphear.cjb.net MultiJoy Plugin : use multiple joysticks / joypads in your program.http://darkphear.cjb.net |
||
| Back to top |
|||
|
Torrey
User Joined: Fri Aug 20th 2004 Location: Ohio |
Thanks for posting that, I'll take a look at the source. The best audio plugin for DarkBASIC Pro! Plays Ogg Vorbis,MP3,FLAC,uncompressed WAV,AIFF,MOD,S3M,XM,and IT files. |
||
| Back to top |
|||
|
Google Ad
AdBot Joined: Aug 26th 2002 Location: Everywhere |
|||
| Back to top |
|||
|
Torrey
User Joined: Fri Aug 20th 2004 Location: Ohio |
DarkPhear, redownload the automated installation file and install it. I changed something in the delete audio function, and it should be fixed now. The best audio plugin for DarkBASIC Pro! Plays Ogg Vorbis,MP3,FLAC,uncompressed WAV,AIFF,MOD,S3M,XM,and IT files. |
||
| Back to top |
|||
|
DarkPhear
User Joined: Wed Oct 15th 2003 Location: Brazil |
It works if I load the sound again without deleting, but it still crashes if I try to load the audio after deleting it. With simple examples: + Code Snippet This one doesn't crash. + Code Snippet This one crashes when loading the audio for the secont time Download free games and demos at my page: http://darkphear.cjb.net MultiJoy Plugin : use multiple joysticks / joypads in your program.http://darkphear.cjb.net |
||
| Back to top |
|||
|
Torrey
User Joined: Fri Aug 20th 2004 Location: Ohio |
I can fix this, but what is the reason why you're looping in this style? Also for some reason I can't reproduce the error on xp home, or win2k pro. The best audio plugin for DarkBASIC Pro! Plays Ogg Vorbis,MP3,FLAC,uncompressed WAV,AIFF,MOD,S3M,XM,and IT files. |
||
| Back to top |
|||
|
DarkPhear
User Joined: Wed Oct 15th 2003 Location: Brazil |
This code is just a sample to isolate the problem, what I'm actually doing with my game is deleting the song and loading another using the same index number. I'm using Windows 98 here. Download free games and demos at my page: http://darkphear.cjb.net MultiJoy Plugin : use multiple joysticks / joypads in your program.http://darkphear.cjb.net |
||
| Back to top |
|||
|
Torrey
User Joined: Fri Aug 20th 2004 Location: Ohio |
Now we're cooking with gasoline, redownload! I found that in delete audio I deleted the reference but when I was loading audio the first time I never added the reference, so...pop goes the weasel on the second load of the same index. The best audio plugin for DarkBASIC Pro! Plays Ogg Vorbis,MP3,FLAC,uncompressed WAV,AIFF,MOD,S3M,XM,and IT files. |
||
| Back to top |
|||
|
DarkPhear
User Joined: Wed Oct 15th 2003 Location: Brazil |
Yeah, it's fixed. Thanks dude. Download free games and demos at my page: http://darkphear.cjb.net MultiJoy Plugin : use multiple joysticks / joypads in your program.http://darkphear.cjb.net |
||
| Back to top |
|||
|
Torrey
User Joined: Fri Aug 20th 2004 Location: Ohio |
Here's another distro for DarkGDK. For the most part this will have to be unsupported because I do not own the DarkGDK to even test if there is problems or not. The automated installer installs the files to these locations below: audiodll.dll - Windows System32 directory. (So if you decide to distribute a game, you'll need to copy it from that folder to your game's root folder. audiodll.h - Installs to MSVC include directory. audiodll.lib - Installs to MSVC lib directory. To include this plugin with your source code at the top of your main cpp file put: #include <audiodll.h> Also remember to update the settings for the linker to include the audiodll.lib file. Click here to download the installer for this distro. [edit] Take a look at the include file to see what the function name and params are for each one. It's pretty self explanitory after you see it. The best audio plugin for DarkBASIC Pro! Plays Ogg Vorbis,MP3,FLAC,uncompressed WAV,AIFF,MOD,S3M,XM,and IT files. |
||
| Back to top |
|||
|
Etienne
User Joined: Sat Jan 17th 2004 Location: Rebirth |
Thanks ... just thanks Garage Creator |
||
| Back to top |
|||
|
Torrey
User Joined: Fri Aug 20th 2004 Location: Ohio |
Quote: "Thanks ... just thanks"
No problem, I enjoyed creating this plugin!I'm curious to see how the plugin works with DGSDK, if anyone uses it with that product, please let me know the results. The best audio plugin for DarkBASIC Pro! Plays Ogg Vorbis,MP3,FLAC,uncompressed WAV,AIFF,MOD,S3M,XM,and IT files. |
||
| Back to top |
|||
|
CPU
User ![]() Joined: Fri Jul 4th 2003 Location: On your motherboard! |
Torry, would it be possible for you to forgo the installer and perhaps zip the files so I can place the files in my own folder which I'm reserving for plugins and enhancments such as this? It's a trivial matter to add a search path for the compiler so that it'll find the library and h file wherever I decide to stash them and that way I know which files are native and which ones are not, which ones I need to distribute and so on and so fourth... Thanks for the awsome work Torrey! CPU K-OS Battlefields
IS ///---///---///---UNDER CONSTRUCTION---\\\---\\\---\\\ |
||
| Back to top |
|||
|
Etienne
User Joined: Sat Jan 17th 2004 Location: Rebirth |
before there was bass dll ... wich was quite good , but didn't kept beeing upgraded , i was sad that mod files were forgotten , due to there size and audio quality .. you revived them man , i think i may integrate them now Garage Creator |
||
| Back to top |
|||
|
Thebeely
User Joined: Wed May 4th 2005 Location: Croatia |
Errr... You probably forgot (or don't want to make it PLEASE... I'm not really smart... |
||
| Back to top |
|||
|
Torrey
User Joined: Fri Aug 20th 2004 Location: Ohio |
Quote: "Errr...
Look up top. It's been there for quite some time now.You probably forgot (or don't want to make it ...), but can you, PLEASE put "pause audio" function? PLEASE..." Quote: "before there was bass dll ... wich was quite good , but didn't kept beeing upgraded , i was sad that mod files were forgotten , due to there size and audio quality .. you revived them man , i think i may integrate them now"
I wish the authors of Audiere would make an update, but I think they've abandoned the project Quote: "Torry, would it be possible for you to forgo the installer and perhaps zip the files so I can place the files in my own folder which I'm reserving for plugins and enhancments such as this? It's a trivial matter to add a search path for the compiler so that it'll find the library and h file wherever I decide to stash them and that way I know which files are native and which ones are not, which ones I need to distribute and so on and so fourth...
Thanks for the awsome work Torrey! CPU" I will try zipping these up tonight at work. Sorry about taking so long, I've been working a lot of different things. |
||
| Back to top |
|||
|
Etienne
User Joined: Sat Jan 17th 2004 Location: Rebirth |
Hmmm .. i think it would be cool to port it to dsdk Garage Creator |
||
| Back to top |
|||
|
Torrey
User Joined: Fri Aug 20th 2004 Location: Ohio |
|
||
| Back to top |
|||
|
Sven B
User Joined: Wed Jan 5th 2005 Location: Belgium |
I like your DLL. Really! But I'm looking some time now for a DLL that takes the role of an equalizer. You know: bass boost, treble, etc. Immunity and Annihalation makes Immunihalation... |
||
| Back to top |
|||
|
Rpg Cyco
User Joined: Mon Aug 26th 2002 Location: Australia |
Hey Torrey, Excellent work on this plugin! But I am having a few problems. Pausing does not seem to work correctly, even with a simple program, such as this. + Code Snippet Am I using it wrong? I probably am, knowing me. Secondly, is there a reason why Audiere does not support seeking with MP3 files? Is it because of MP3 licencing fees? It's a shame no matter what the reason. I know there was discussion about it above, but have you ever considered creating a wrapper for FMOD for use in free programs only? It seems Audiere is entirely inactive. - Rpg Cyco |
||
| Back to top |
|||
|
Torrey
User Joined: Fri Aug 20th 2004 Location: Ohio |
I have started working this and actually updated the setup file, but there's another problem that happened after the fix for pausing and resume. The plugin now decides to hang the application it's being used with. From what the debugger shows one of the threads that gets created has some kind of error I need to figure out. |
||
| Back to top |
|||
|
Rpg Cyco
User Joined: Mon Aug 26th 2002 Location: Australia |
I encountered some weird problems when programming my audio player, involving the the audio exist() and delete audio commands. If I call audio exist() before I load a audio file, it reports 0, but after loading a file and then attempted to delete it, audo exist() remains at 1. So I guess the delete audio command doesn't work, or doesn't signify that it's been deleted within the DLL (I obviously don't know how it works, just guessing). I've also experienced very hard lockups as well, but I'm not sure if they're related to the above problem. - Rpg Cyco |
||
| Back to top |
|||
|
Torrey
User Joined: Fri Aug 20th 2004 Location: Ohio |
The setup files at the top of this thread have been updated if you want to redownload them. The AUDIO EXIST command is now updated correctly, and from the small tests I've done the plugin no longer causes any hangups. All should be working in stable condition! REMEMBER, you must DELETE AUDIO every audio file you load before your app exits! |
||
| Back to top |
|||
This is a multi-page thread older than 30 days.
Go to the last page to check if you can reply to it.
Go to the last page to check if you can reply to it.
Forum Search
Enter a word or phrase to search our Forum for:
|
|








