Home
Products
Community
Manuals
Contact
Login or Signup

MiniB3D Sound Module

BlitzMax Modules Forums/MiniB3D/MiniB3D Sound Module

ima747(Posted 1+ years ago) #1
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
http://ima747.gotdns.com/blitzmax/minib3dsoundv1.0.zip

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)



verfum(Posted 1+ years ago) #2
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


ima747(Posted 1+ years ago) #3
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.


klepto2(Posted 1+ years ago) #4
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 :)


ima747(Posted 1+ years ago) #5
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.


verfum(Posted 1+ years ago) #6
I've kind of got the grips of it, but could you supply a quick example of the key features?


ima747(Posted 1+ years ago) #7
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.


ima747(Posted 1+ years ago) #8
http://ima747.gotdns.com/blitzmax/minib3dSoundv1.1.zip

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.


verfum(Posted 1+ years ago) #9
Looks like you have taken SOUND_LOOP out, it can't find it to compile?


verfum(Posted 1+ years ago) #10
Sorry, my mistake, needs to be changed to True.


ima747(Posted 1+ years ago) #11
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.


verfum(Posted 1+ years ago) #12
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.


verfum(Posted 1+ years ago) #13
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.


verfum(Posted 1+ years ago) #14
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"



ima747(Posted 1+ years ago) #15
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.



verfum(Posted 1+ years ago) #16
After I built your mods I then went into Synchronize Modules yes.


verfum(Posted 1+ years ago) #17
Sorry I was wrong, I hadn't synchronized, everything running fine now, your module is very nice, no bugs to report yet :)


ima747(Posted 1+ years ago) #18
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.


verfum(Posted 1+ years ago) #19
Will do, so far so good though :)


ima747(Posted 1+ years ago) #20
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
http://toscaledesign.com/minib3d/minib3dSoundv1.2.zip