aarku
2005.02.25, 07:39 PM
SqueakLib is a small library I put together for game audio. It is based off of SWSounds, a utility in SpriteWorld. It has been separated from SpriteWorld, cleaned up a little, the documentation extended, legacy stuff removed, and a couple of things added.
It is released under the zlib/libpng license, like SpriteWorld, so feel free to use it. There is currently one example, SimpleSqueakingCocoa, in the Examples folder. There is a prebuilt executable within its build folder. The libSqueakLib.a is also prebuilt.
Full documentation is pointed to in the DOCUMENTATION.txt file.
Download it here: http://www.tc.umn.edu/~czec0035/files/SqueakLib-v0.2.1.tar.gz
I may or may not continue to work on this. I do not think a strict Carbon example is neccsary, since it is so easy to take a look at MySqueakView.m and .h to figure out what to do. It is well commented. If you want something more complicated, check out OpenAL.
A note on the looping music: SqueakLib loops audio fine, but junglebeat.mp3 was made quickly and probably isn't looped properly.
Using SqueakLib:
Add libSqueakLib.a and SqueakLib.h to your project, and add the appropriate header and library search paths to your project.
Add the Carbon and QuickTime frameworks, if they are not already in your project.
Call: slInit(numberOfChannels);
Call: one of the loading functions like: slLoadSoundFromBundle("audio", "squeak.mp3", &squeakSoundID);
Call: one of the playing functions like: slPlaySound(squeakSoundID, 0, kFindEmptyChannel);
Call: slExit(); when you are completely done with SqueakLib.
See the SimpleSqueakingCocoa example and the documentation for more information.
-Jon
It is released under the zlib/libpng license, like SpriteWorld, so feel free to use it. There is currently one example, SimpleSqueakingCocoa, in the Examples folder. There is a prebuilt executable within its build folder. The libSqueakLib.a is also prebuilt.
Full documentation is pointed to in the DOCUMENTATION.txt file.
Download it here: http://www.tc.umn.edu/~czec0035/files/SqueakLib-v0.2.1.tar.gz
I may or may not continue to work on this. I do not think a strict Carbon example is neccsary, since it is so easy to take a look at MySqueakView.m and .h to figure out what to do. It is well commented. If you want something more complicated, check out OpenAL.
A note on the looping music: SqueakLib loops audio fine, but junglebeat.mp3 was made quickly and probably isn't looped properly.
Using SqueakLib:
Add libSqueakLib.a and SqueakLib.h to your project, and add the appropriate header and library search paths to your project.
Add the Carbon and QuickTime frameworks, if they are not already in your project.
Call: slInit(numberOfChannels);
Call: one of the loading functions like: slLoadSoundFromBundle("audio", "squeak.mp3", &squeakSoundID);
Call: one of the playing functions like: slPlaySound(squeakSoundID, 0, kFindEmptyChannel);
Call: slExit(); when you are completely done with SqueakLib.
See the SimpleSqueakingCocoa example and the documentation for more information.
-Jon