Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

Cinder-poSoundManager

Potion's basic sound management block for Cinder. It is particularly useful for playing multiple sounds at once without worrying about volume. The volume for all currently playing sounds are averaged to remain under a MAX_VOLUME threshold internally. Cinder-poSoundManager is released under the BSD New License.

The block consists of a single class, SoundManager, that provides basic sound playback control.

Features

  • Play, loop a track created with a datasource or audio buffer
  • Stop a track, all sounds, or tracks in a group
  • Track pan and gain
  • Signal when a sound has finished playing
  • Averaged volume when playing multiple tracks

Samples

  • MultipleSounds: plays a looped sound on mouse down and other sounds on key press.

Getting Started

Play a sound:

DataSourceRef source = loadAsset("tune.wav");
po::SoundManager::get()->play(source);

Stop a looped sound:

DataSourceRef source = loadAsset("tune.wav");
unsigned int mTrackID = po::SoundManager::get()->play(source, 0, true); // looped

po::SoundManager::get()->stop(mTrackID);

About

Potion's basic sound management block for Cinder.

Resources

License

Packages

No packages published

Languages