Very useful sound libary

Community Forums/Showcase/Very useful sound libary

bytecode77(Posted 2006) [#1]
hello!
are you looking for a good sound libary?
here ya go:



how it works:
you have to call createsound like that:
CreateSound("Sound\Test.wav")


within this command he loads the sound from your disk. when you play the sound again, he doesn't have to load it again, because it IS already in the RAM, so he just plays it from RAM.
this is practical because if you have got a complicated game, he doesnt have to load the sound of the last level while playing the first ;-)
and you dont have to make 20 values global and then load them apart!


Grey Alien(Posted 2006) [#2]
so where's the actual library then...?


Damien Sturdy(Posted 2006) [#3]
Lol, don't be mean grey ;)

Devils Child, (hmm, you stole my name...) This is quite a handy little thing really, but it's not a sound library, more of a sound organisation library or something :)

However, it looks like youre trying to have a "Double volume" feature that simply won't work, it will distort the speakers when using high quality sounds....


Also,

Function InitSoundLib(path$)
CreateListener(Cam)
End Function


perhaps should be

Function InitSoundLib(path$,Parent)
CreateListener(Parent)
End Function



bytecode77(Posted 2006) [#4]
sounds like you are very happy about this :(...

but for noobs: this is practicaly for your games, because you dont have to pre-load each sound!


Damien Sturdy(Posted 2006) [#5]
I didn't mean to sound negative, however, my suggestions are an improvement for your code. :)


bytecode77(Posted 2006) [#6]
well, it will be updated during the next month(s), so you can change the volume by UpdateSoundLib() and so on...


Grey Alien(Posted 2006) [#7]
I asked about the libray because CreateListener doesn't exist. I thought this was some kind of library wrapper (at a glance)


tonyg(Posted 2006) [#8]
CreateListener doesn't exist


Think you might have the wrong flavour of Blitz in mind.

Creates a listener entity and returns its handle. Currently, only a single listener is supported.



Damien Sturdy(Posted 2006) [#9]
Lol, Grey. its B3D :) it looked like you were being a meanie!!


Grey Alien(Posted 2006) [#10]
oh I see I tried it in BMax and BPlus.

OK some advice, please post which Blitz the code is to be used with in future, thanks :-)