Sound library : How to use sound by name ?

BlitzMax Forums/BlitzMax Tutorials/Sound library : How to use sound by name ?

Filax(Posted 2005) [#1]
Hi :)

I'm making a little sound library this is the code :) you can tell sound
with name for easy using :)



How to use ? :



Its only the start :) you can improve this lib !


Clyde(Posted 2005) [#2]
Great idea for a tutorial, what's it for and how exactly does it work etc? Could you explain further with more text and comments, etc etc.

Cheers
Clyde


Filax(Posted 2005) [#3]
Hi clyde :) happy to ear you :)

It's really simple ! first you preload you sound with :



Note : You can preload multiple sound !!!

And next you call sound playing, not with global var, but simply
with her name ! with :



Example with multi sounds :) ? ok :)

First, imagine you want to play 20 sounds ! you must have
20 global (or other method) example :



Etc ... Ok ? it's a little bit heavy ? with my lib your preload all your
sounds in one time !


and if you want to play your sound make this :



I hope this explain help you to clarify my lib :)

Note : About SFX_PlaySound("mywav03",true)

The true parameter is here to force to stop the sound before replay it !