GMFreeSL is an OpenAL wrapper powered by FreeSL library, which is OpenAL wrapper for C++.
It's still limited to some functions though, we'll add more if people'll like it.
Also, notice that OpenAL does NOT support MP3. It's commercial. If you want to use MP3 in your project,
go get FMOD or BASS.
Can I use it in my commercial game?
Yes, you can.
Do I have to credit someone?
Of course you do. There's instruction regarding this case in the "License.txt" file provided with GMFreeSL package.
How to use it?
To initialize GMFreeSL you'll have to call 2 functions and create an empty object.
First, put this code somewhere:
Now, to creating an object.
Create an empty object and call it whatever you want.
Put this code into step event:
Now, put this code into game end event:
ALStopAll(); ALFreeAll(); ALShutdown();
To load a sound call ALLoadSound() or ALLoadSoundFromZip():
global.mysound = ALLoadSound(0, "sounds/mysound.ogg", 0); // Simple sound global.mymusic = ALLoadSound(1, "sounds/mymusic.ogg", 1); // Stream, used for large sound files - Just like music.ALLoadSoundFromZip() loads only simple sounds - for now.
To play a sound call ALSoundPlay, to stop it use ALSoundStop() etc.
ALSoundPlay(global.mysound); ALSetSoundLoop(global.mymusic, 1); // Loop music ALSoundPlay(global.music);
That'd be basic init.
What formats does OpenAL support?
Well unfortunately, simple sounds support:
Streams support only ogg... But can play an audio stream from avi file.
Edited by BagnoHax, 10 January 2010 - 02:24 PM.