Home | All Classes | Grouped Classes | Index | Search
Sample interface in ClanLib. More...
Derived from:
none
Derived by:
none
Group: Sound (Audio Mixing)
#include <ClanLib/sound.h>
Construction:
Construct sound buffer. |
Operators:
Copy assignment. |
Attributes:
Returns the static soundprovider attached or NULL if it is a streamed sound buffer. | |
Return the streamed soundprovider attached or NULL if it is a static sound buffer. | |
Returns the length of the soundbuffer. That is num_samples * bytes_per_sample. | |
Returns the number of samples in the soundbuffer. | |
Returns the start frequency used when the buffer is played. |
Operations:
Sets the start frequency used when the buffer is played. | |
Returns the start/default volume used when the buffer is played. | |
Sets the default volume used when the buffer is played. | |
Returns the default panning position when the buffer is played. | |
Sets the default panning position when the buffer is played. | |
Returns true if an instance of this soundbuffer is playing | |
Stops any sessions playing this soundbuffer | |
Plays the soundbuffer on the specified soundcard and using the specified playback description. | |
Prepares the soundbuffer for playback on the specified soundcard. |
Implementation:
Detailed description:
The CL_SoundBuffer class represents a sample in ClanLib. It can either be static or streamed. The soundbuffer gets its sample data from a soundprovider, that is passed during construction.
A static sample are normally sound effects and other sounds, that do not change. ClanLib will always load the entire sample into memory, and possibly upload it to the soundcard.
Streamed samples are either large sample that should be loaded a bit at a time (music for instance), or sounds that change from playback to playback (a microphone, speech over the net, etc).