24 #ifndef _SOUND_HANDLE_H_ 25 #define _SOUND_HANDLE_H_ 28 #include <csutil/csstring.h> 65 void Fade (
float volume,
int time,
int direction);
75 bool Init (
const char *resname,
bool loop,
76 float volume_preset,
int type,
90 csVector3 pos, csVector3 dir,
110 void SetCallback(
void (*
object),
void (*
function) (
void *));
119 void (*callbackobject);
120 void (*callbackfunction) (
void *);
bool GetAutoRemove()
Returns state of AutoRemove.
bool fade_stop
pause this sound after fading down true / false
csRef< iSndSysSource3D > sndsource3d
sndsource if 3D
void SetCallback(void(*object), void(*function)(void *))
Sets a Callback to a object function.
int fade
>0 is number of steps up <0 is number of steps down, 0 is nothing
void Fade(float volume, int time, int direction)
Does fading calculation for this Handle.
csRef< iSndSysSource3DDirectionalSimple > sndsourcedir
additional source if 3D and directional
csRef< iSndSysStream > sndstream
sound stream
float preset_volume
the volume all calculations are based upon
bool autoremove
remove this handle when pause?
void RemoveCallback()
Remove the callback.
float fade_volume
volume we add or remove in each step (during fading)
csString name
name of the resource or the file - not unique
A Volume and Sound control class.
csRef< iSndSysData > snddata
pointer to sound data
void ConvertTo3D(float mindist, float maxdist, csVector3 pos, csVector3 dir, float rad)
Converts this Handle to a 3D Handle.
bool Init(const char *resname, bool loop, float volume_preset, int type, SoundControl *&ctrl)
Initialize this Handle.
csRef< iSndSysSource > sndsource
sndsource if 2D
This Manager Object is used to play all sounds.
void SetAutoRemove(bool toggle)
Whether to remove this Sound/Handle on pause.