flimEngine
SoundCall Class Reference

#include <SoundCall.h>

Collaboration diagram for SoundCall:
Collaboration graph

Public Member Functions

 SoundCall ()=delete
 
 SoundCall (const SoundCall &)
 
const SoundCall & operator= (const SoundCall &)
 
 ~SoundCall ()
 
 SoundCall (SoundCallID _id, bool _3D=false)
 
 SoundCall (SoundCallID _id, int _priority)
 Constructor. More...
 
snd_err Pan (float p, int triggerTime=0)
 Pans. More...
 
snd_err Pan (float from, float to, float time, int triggerTime=0)
 Pans. More...
 
snd_err Loop (bool toLoop, int triggerTime=0)
 Loops. More...
 
snd_err Pitch (float p, int triggerTime=0)
 Pitches. More...
 
snd_err Pitch (float from, float to, float time, int triggerTime=0)
 Pitches. More...
 
snd_err Volume (float p, int triggerTime=0)
 Volumes. More...
 
snd_err Volume (float from, float to, float time, int triggerTime=0)
 Volumes. More...
 
snd_err Play (bool toLoop=false, int t=0, int _priority=0)
 Plays. More...
 
snd_err Stop (int t=0)
 Stops the given t. More...
 
snd_err Pause (int t=0)
 Pauses the given t. More...
 
snd_err PrintDuration (int time, const char *name)
 
snd_err IsPlaying (bool &)
 Is playing. More...
 
snd_err GetTimeSinceStarted (int &)
 Gets time since started. More...
 
snd_err GetVolume (float &)
 Gets a volume. More...
 
snd_err GetPitch (float &)
 Gets a pitch. More...
 
snd_err GetPan (float &)
 Gets a pan. More...
 
snd_err GetPriority (int &)
 Gets a priority. More...
 
snd_err GetPriorityIndex (int &)
 Gets priority index. More...
 
snd_err GetLoop (bool &)
 Gets a loop. More...
 
unsigned int GetHandleNo ()
 Gets handle no. More...
 
snd_err SubmitSoundEndedCallback (CallbackCommand *cmd)
 Callback, called when the submit sound ended. More...
 
snd_err setPosition (const Vect &)
 Sets a position. More...
 
snd_err setOrientation (const Vect &vect, float xU, float yU, float zU)
 Sets an orientation. More...
 
snd_err SetReverbLevel (float level)
 Sets reverb level. More...
 
snd_err SetReverbTime (float time)
 Sets reverb time. More...
 
snd_err SetReverbPreDelay (float time)
 Sets reverb pre delay. More...
 
snd_err SetReverbSize (float size)
 Sets reverb size. More...
 
snd_err SetReverbDensity (float density)
 Sets reverb density. More...
 

Private Member Functions

snd_err SuccessfullyPlay (int index)
 
snd_err SuccessfullyStop ()
 
snd_err SoundEnded ()
 

Private Attributes

Timer time
 
int priorityIndex
 
bool is3D
 
int currentTime
 
float volume
 
float pitch
 
float pan
 
int priority
 
bool isPlaying
 
bool loop
 
SoundExecutioner * soundEndedBroker
 
SoundCallID id
 
Handle handle
 

Friends

class SoundEngine
 
class MarkForPlayCommand
 
class MarkForStopCommand
 
class CallbackSoundEndedCommand
 

Constructor & Destructor Documentation

◆ SoundCall() [1/4]

SoundCall::SoundCall ( )
delete

◆ SoundCall() [2/4]

SoundCall::SoundCall ( const SoundCall &  tmp)

◆ ~SoundCall()

SoundCall::~SoundCall ( )

◆ SoundCall() [3/4]

SoundCall::SoundCall ( SoundCallID  _id,
bool  _3D = false 
)

◆ SoundCall() [4/4]

SoundCall::SoundCall ( SoundCallID  _id,
int  _priority 
)

Constructor.

Author
Jack Campbell
Date
6/1/2017
Parameters
_idThe identifier.
_priorityThe priority.

Member Function Documentation

◆ GetHandleNo()

unsigned int SoundCall::GetHandleNo ( )

Gets handle no.

Author
Jack Campbell
Date
6/1/2017
Returns
The handle no.

◆ GetLoop()

snd_err SoundCall::GetLoop ( bool &  out)

Gets a loop.

Author
Jack Campbell
Date
6/1/2017
Parameters
[in,out]parameter1The first parameter.
Returns
The loop.

◆ GetPan()

snd_err SoundCall::GetPan ( float &  out)

Gets a pan.

Author
Jack Campbell
Date
6/1/2017
Parameters
[in,out]parameter1The first parameter.
Returns
The pan.

◆ GetPitch()

snd_err SoundCall::GetPitch ( float &  out)

Gets a pitch.

Author
Jack Campbell
Date
6/1/2017
Parameters
[in,out]parameter1The first parameter.
Returns
The pitch.

◆ GetPriority()

snd_err SoundCall::GetPriority ( int &  out)

Gets a priority.

Author
Jack Campbell
Date
6/1/2017
Parameters
[in,out]parameter1The first parameter.
Returns
The priority.

◆ GetPriorityIndex()

snd_err SoundCall::GetPriorityIndex ( int &  out)

Gets priority index.

Author
Jack Campbell
Date
6/1/2017
Parameters
[in,out]parameter1The first parameter.
Returns
The priority index.

◆ GetTimeSinceStarted()

snd_err SoundCall::GetTimeSinceStarted ( int &  out)

Gets time since started.

Author
Jack Campbell
Date
6/1/2017
Parameters
[in,out]parameter1The first parameter.
Returns
The time since started.

◆ GetVolume()

snd_err SoundCall::GetVolume ( float &  out)

Gets a volume.

Author
Jack Campbell
Date
6/1/2017
Parameters
[in,out]parameter1The first parameter.
Returns
The volume.

◆ IsPlaying()

snd_err SoundCall::IsPlaying ( bool &  out)

Is playing.

Author
Jack Campbell
Date
6/1/2017
Parameters
[in,out]parameter1The first parameter.
Returns
A snd_err.

◆ Loop()

snd_err SoundCall::Loop ( bool  toLoop,
int  triggerTime = 0 
)

Loops.

Author
Jack Campbell
Date
6/1/2017
Parameters
toLoopTrue to to loop.
triggerTime(Optional) The trigger time.
Returns
A snd_err.

◆ operator=()

const SoundCall & SoundCall::operator= ( const SoundCall &  tmp)

◆ Pan() [1/2]

snd_err SoundCall::Pan ( float  p,
int  triggerTime = 0 
)

Pans.

Author
Jack Campbell
Date
6/1/2017
Parameters
pThe float to process.
triggerTime(Optional) The trigger time.
Returns
A snd_err.

◆ Pan() [2/2]

snd_err SoundCall::Pan ( float  from,
float  to,
float  time,
int  triggerTime = 0 
)

Pans.

Author
Jack Campbell
Date
6/1/2017
Parameters
fromSource for the.
toto.
timeThe time.
triggerTime(Optional) The trigger time.
Returns
A snd_err.

◆ Pause()

snd_err SoundCall::Pause ( int  t = 0)

Pauses the given t.

Author
Jack Campbell
Date
6/1/2017
Parameters
t(Optional) The int to process.
Returns
A snd_err.

◆ Pitch() [1/2]

snd_err SoundCall::Pitch ( float  p,
int  triggerTime = 0 
)

Pitches.

Author
Jack Campbell
Date
6/1/2017
Parameters
pThe float to process.
triggerTime(Optional) The trigger time.
Returns
A snd_err.

◆ Pitch() [2/2]

snd_err SoundCall::Pitch ( float  from,
float  to,
float  time,
int  triggerTime = 0 
)

Pitches.

Author
Jack Campbell
Date
6/1/2017
Parameters
fromSource for the.
toto.
timeThe time.
triggerTime(Optional) The trigger time.
Returns
A snd_err.

◆ Play()

snd_err SoundCall::Play ( bool  toLoop = false,
int  t = 0,
int  _priority = 0 
)

Plays.

Author
Jack Campbell
Date
6/1/2017
Parameters
toLoop(Optional) True to to loop.
t(Optional) The int to process.
_priority(Optional) The priority.
Returns
A snd_err.

◆ PrintDuration()

snd_err SoundCall::PrintDuration ( int  time,
const char *  name 
)

◆ setOrientation()

snd_err SoundCall::setOrientation ( const Vect &  vect,
float  xU = 0.0f,
float  yU = 1.0f,
float  zU = 0.0f 
)

Sets an orientation.

Author
Jack Campbell
Date
6/1/2017
Parameters
vectThe vect.
xUThe x coordinate u.
yUThe y coordinate u.
zUThe z coordinate u.
Returns
A snd_err.

◆ setPosition()

snd_err SoundCall::setPosition ( const Vect &  vect)

Sets a position.

Author
Jack Campbell
Date
6/1/2017
Parameters
parameter1The first parameter.
Returns
A snd_err.

◆ SetReverbDensity()

snd_err SoundCall::SetReverbDensity ( float  density)

Sets reverb density.

Author
Jack Campbell
Date
6/1/2017
Parameters
densityThe density.
Returns
A snd_err.

◆ SetReverbLevel()

snd_err SoundCall::SetReverbLevel ( float  level)

Sets reverb level.

Author
Jack Campbell
Date
6/1/2017
Parameters
levelThe level.
Returns
A snd_err.

◆ SetReverbPreDelay()

snd_err SoundCall::SetReverbPreDelay ( float  time)

Sets reverb pre delay.

Author
Jack Campbell
Date
6/1/2017
Parameters
timeThe time.
Returns
A snd_err.

◆ SetReverbSize()

snd_err SoundCall::SetReverbSize ( float  size)

Sets reverb size.

Author
Jack Campbell
Date
6/1/2017
Parameters
sizeThe size.
Returns
A snd_err.

◆ SetReverbTime()

snd_err SoundCall::SetReverbTime ( float  time)

Sets reverb time.

Author
Jack Campbell
Date
6/1/2017
Parameters
timeThe time.
Returns
A snd_err.

◆ SoundEnded()

snd_err SoundCall::SoundEnded ( )
private

◆ Stop()

snd_err SoundCall::Stop ( int  t = 0)

Stops the given t.

Author
Jack Campbell
Date
6/1/2017
Parameters
t(Optional) The int to process.
Returns
A snd_err.

◆ SubmitSoundEndedCallback()

snd_err SoundCall::SubmitSoundEndedCallback ( CallbackCommand *  cmd)

Callback, called when the submit sound ended.

Author
Jack Campbell
Date
6/1/2017
Parameters
[in,out]cmdIf non-null, the command.
Returns
A snd_err.

◆ SuccessfullyPlay()

snd_err SoundCall::SuccessfullyPlay ( int  index)
private

◆ SuccessfullyStop()

snd_err SoundCall::SuccessfullyStop ( )
private

◆ Volume() [1/2]

snd_err SoundCall::Volume ( float  p,
int  triggerTime = 0 
)

Volumes.

Author
Jack Campbell
Date
6/1/2017
Parameters
pThe float to process.
triggerTime(Optional) The trigger time.
Returns
A snd_err.

◆ Volume() [2/2]

snd_err SoundCall::Volume ( float  from,
float  to,
float  time,
int  triggerTime = 0 
)

Volumes.

Author
Jack Campbell
Date
6/1/2017
Parameters
fromSource for the.
toto.
timeThe time.
triggerTime(Optional) The trigger time.
Returns
A snd_err.

Friends And Related Function Documentation

◆ CallbackSoundEndedCommand

friend class CallbackSoundEndedCommand
friend

◆ MarkForPlayCommand

friend class MarkForPlayCommand
friend

◆ MarkForStopCommand

friend class MarkForStopCommand
friend

◆ SoundEngine

friend class SoundEngine
friend

Member Data Documentation

◆ currentTime

int SoundCall::currentTime
private

◆ handle

Handle SoundCall::handle
private

◆ id

SoundCallID SoundCall::id
private

◆ is3D

bool SoundCall::is3D
private

◆ isPlaying

bool SoundCall::isPlaying
private

◆ loop

bool SoundCall::loop
private

◆ pan

float SoundCall::pan
private

◆ pitch

float SoundCall::pitch
private

◆ priority

int SoundCall::priority
private

◆ priorityIndex

int SoundCall::priorityIndex
private

◆ soundEndedBroker

SoundExecutioner* SoundCall::soundEndedBroker
private

◆ time

Timer SoundCall::time
private

◆ volume

float SoundCall::volume
private

The documentation for this class was generated from the following files: