The BSimpleGameSound class represents simple sound effects that don't change, and remain in memory.

Using BSimpleGameSound is, well, simple:

BSimpleGameSound* mysound = new BSimpleGameSound("soundfile.wav");

This snippet uses BSimpleGameSound to create an object that can be used to play the sound effect in the file "soundfile.wav". Playing the sound is as simple as calling StartPlaying().


In the current version of the BeOS, when you clone a BSimpleGameSound, the sound data buffer is also cloned, so you'll have multiple copies of the sound effect in memory. Keep this in mind as you write your code, as you can rapidly use a lot of memory this way.

Creative Commons License
Legal Notice
This work is licensed under a Creative Commons Attribution-Non commercial-No Derivative Works 3.0 License.