![]() | |
![]() | ![]() |
Entire Class Index | Main Class Index | Cross Index | Global Index |
Sample interface in ClanLib.
Contained in: global
Derived from:
none
Derived by:
none
Group: Sound (Audio Mixing)
#include <ClanLib/sound.h>
public function member index: |
||
Construction: |
||
virtual | ~CL_SoundBuffer | (); |
static CL_SoundBuffer* | load | (const std::string& res_id, CL_ResourceManager* manager); |
static CL_SoundBuffer* | create | (CL_StaticSoundProvider* provider, bool delete_provider=false); |
static CL_SoundBuffer* | create | (CL_StreamSoundProvider* provider, bool delete_provider=false); |
CL_SoundBuffer | (); | |
CL_SoundBuffer | (const std::string& res_id, CL_ResourceManager* manager); | |
CL_SoundBuffer | (CL_StaticSoundProvider* provider, bool delete_provider=false); | |
CL_SoundBuffer | (CL_StreamSoundProvider* provider, bool delete_provider=false); | |
CL_SoundBuffer | (const CL_SoundBuffer& copy); | |
Operators: |
||
void | operator = | (const CL_SoundBuffer& copy); |
Attributes: |
||
CL_StaticSoundProvider* | get_static_provider | () const; |
CL_StreamSoundProvider* | get_stream_provider | () const; |
int | get_length | () const; |
int | get_num_samples | () const; |
int | get_frequency | () const; |
Operations: |
||
bool | set_frequency | (int new_freq); |
float | get_volume | () const; |
bool | set_volume | (float new_volume); |
float | get_pan | () const; |
bool | set_pan | (float new_pan); |
bool | is_playing | (CL_SoundBuffer_Session* *session=NULL, CL_SoundCard* card=NULL) const; |
void | stop | (CL_SoundCard* card=NULL); |
CL_SoundBuffer_Session | play | (bool looping=false, CL_SoundCard* card=NULL); |
CL_SoundBuffer_Session | prepare | (bool looping=false, CL_SoundCard* card=NULL); |
Returns - The created soundbuffer.
Returns - The created soundbuffer.
Returns - Default/start frequency.
Returns - Length of soundbuffer.
Returns - Number of samples in soundbuffer.
Returns - The panning position.
Returns - The static soundprovider or NULL if none.
Returns - The streamed soundprovider of NULL if none.
Returns - The volume.
session - Pointer to session-pointer, set to point to the first session
playing this soundbuffer. Return value is only valid if function returns true
card - Soundcard to be used - NULL means use the current selected
sound card (CL_Sound::get_selected_card().
Returns - The playback session.
card - Soundcard to be used or NULL to use
CL_Sound::get_selected_card().
Returns - The playback session.
new_freq - The new default frequency.
Returns - True if successful, false otherwise.
new_pan - The new default panning position.
Returns - True if successful, false otherwise.
new_volume - The new default volume.
Returns - True if successful, false otherwise.