MiniB3D Sound ModuleBlitzMax Modules Forums/MiniB3D/MiniB3D Sound Module
| I've got a system together and it seems to be working pretty well for handling positional sound. If anyone whose interested could give it a try and let me know if flames leap out the back or not it would be much appreciated.|
I've built it as a module and you will need minib3d installed as a module as well (I can't stand non-colored functions...). But you can easily strip out the module stuff at the top and make it work as an include or an import.
you can download it here
or here's the code if you want to copy and paste (just remember it's a module, so you need to toch it up a little if you do that)
| Excellent, I've just had a moan about the lack of sound, and here you've just created a module, thanks I'll give it a go :D |
| Hope it's usefull to you. I'm working on an update with some more control possibilites and a couple minor bug fixes. let me know if you come across anything that needs fixing/adding etc. |
| very nice work. |
I have also started to add a basic 3DSound System with OpenAL and the OpenAL Sound Driver. So maybe we could support both in minib3d as 2 alternatives. 1 with and 1 alternative with openal.
But for this it would be useful to have one interface which will provide some kind of 3DAudio Driver. If yours is ready I will try to bring both (mine and yours) to one level.
keep up the good work. we are thankful for every helping hand :)
| Sounds good. I'm working on a few more features and a couple minor bug fixes. I'll keep you posted. I started looking into open AL but it seems to refuse to work on my PC so I gave up on that for now. My system uses the blitz audio so it shouldn't have any of those complications. |
| I've kind of got the grips of it, but could you supply a quick example of the key features? |
| I'll hopefully have an update today with a few more features and Ill put together a commented demo to go along with it for you. |
New version with more features. Also included are 2 example programs. a simple one that shows just he basics needed to get going. and an advanced one that uses almost every feature. I've commented the pants off of everything so it should be fairly easy to understand and use. Let me know if anything is confusing etc.
| Looks like you have taken SOUND_LOOP out, it can't find it to compile? |
| Sorry, my mistake, needs to be changed to True. |
| SOUND_LOOP (I'm assuming you're talking about in LoadSound) is part of the blitz audio system and is seperate from the 3D audio. The 3D audio just plays normal sounds through the normal methods, it just manipulates the channels for a 3D effect. SOUND_LOOP and SOUND_HARDWARE work for me. |
| Ah, would this then have something to do with me not updating my BMax yet? Maybe they changed it from True to specific functions, like LOOP and HARDWARE. I'm experiencing quite a few issues with libraries that people have written, I best update. |
| I've just updated my BMax to 1.24 and it still pulls the error up? Regarding SOUND_LOOP. I'm fairly new to BMax so you may need to bare with me, sorry. |
| I cant find anything to do with SOUND_LOOP or SOUND_HARDWARE, here is the help file for LoadSound|
Function LoadSound:TSound( url:Object,loop_flag=False )
Rem Load and Play a small example wav file with looping. End Rem sound=LoadSound("shoot.wav",true) PlaySound sound Input "Press any key to continue"
| Have you synced your mods since you updated? the example in my help file is |
Rem Load and Play a small example wav file. End Rem sound=LoadSound("shoot.wav") PlaySound sound Input "Press any key to continue"
the information fied above it is
url can be either a string, a stream or an audio sample object. The returned sound can be played using PlaySound or CueSound. The flags parameter can be any combination of: SOUND_LOOP : The sound should loop when played back. SOUND_HARDWARE : The sound should be placed in onboard soundcard memory if possible.
| After I built your mods I then went into Synchronize Modules yes. |
| Sorry I was wrong, I hadn't synchronized, everything running fine now, your module is very nice, no bugs to report yet :) |
| glad to hear :0) keep me posted if you spot any, I haven't had any time to poke at it for the last few days. |
| Will do, so far so good though :) |
| V1.2 - http://ima747.gotdns.com/blitzmax/minib3dSoundv1.2.zip|
Updated the worklog as well.
If there's interest I will update the advanced example to include the new functions, but I think they should be fairly easy to understand as is.
As always, let me know if you find any bugs.
UPDATE: May 17, 2009
Due to inquiry I was made aware the link is dead, here is a link to a new mirror