ClanLib
2.3.7
|
Fade Filter Class. More...
#include <fadefilter.h>
Public Member Functions | |
Construction | |
CL_FadeFilter (float initial_volume) | |
Fade Filter Constructor. More... | |
virtual | ~CL_FadeFilter () |
Fade Filter Destructor. More... | |
Attributes | |
float | get_volume () const |
Returns the current volume of the fade filter, from 0.0f (no volume) to 1.0f (full volume). More... | |
Operations | |
CL_FadeFilterProvider * | get_provider () const |
Retrieves the provider. More... | |
void | set_volume (float new_volume) |
Sets the volume instant. More... | |
void | fade_to_volume (float new_volume, int duration=1000) |
Fade to volume, from 0.0f (no volume) to 1.0f (full volume). More... | |
Operators | |
bool | operator== (const CL_SoundFilter &other) const |
Equality operator. More... | |
bool | operator!= (const CL_SoundFilter &other) const |
Inequality operator. More... | |
Operations | |
bool | is_null () const |
Returns true if this object is invalid. More... | |
void | throw_if_null () const |
Throw an exception if this object is invalid. More... | |
void | filter (float **sample_data, int num_samples, int channels) |
Filter callback. More... | |
Public Attributes | |
Implementation | |
CL_SharedPtr< CL_SoundFilter_Impl > | impl |
Fade Filter Class.
CL_FadeFilter::CL_FadeFilter | ( | float | initial_volume) |
Fade Filter Constructor.
|
virtual |
Fade Filter Destructor.
void CL_FadeFilter::fade_to_volume | ( | float | new_volume, |
int | duration = 1000 |
||
) |
Fade to volume, from 0.0f (no volume) to 1.0f (full volume).
|
inherited |
Filter callback.
All sound data is passed through this function, which modifies the sample data accordingly to the function of the filter.
The format of the sample data is always 16 bit stereo.
CL_FadeFilterProvider* CL_FadeFilter::get_provider | ( | ) | const |
Retrieves the provider.
float CL_FadeFilter::get_volume | ( | ) | const |
Returns the current volume of the fade filter, from 0.0f (no volume) to 1.0f (full volume).
|
inlineinherited |
Returns true if this object is invalid.
|
inlineinherited |
Inequality operator.
References CL_SoundFilter::impl.
|
inlineinherited |
Equality operator.
References CL_SoundFilter::impl.
void CL_FadeFilter::set_volume | ( | float | new_volume) |
Sets the volume instant.
|
inherited |
Throw an exception if this object is invalid.
|
inherited |
Referenced by CL_SoundFilter::operator!=(), and CL_SoundFilter::operator==().