![]() |
Gorgon Game Engine
|
Positional controller allows sounds to be played at a specific location. More...
Public Member Functions | |
PositionalController ()=default | |
Default constructor. More... | |
PositionalController (const Containers::Wave &wavedata) | |
Filling constructor. More... | |
Geometry::Point3D | GetLocation () const |
void | Move (const Geometry::Point3D &target) |
void | Move (const Geometry::Pointf &target) |
virtual ControllerType | Type () const override |
Returns the type of the controller. More... | |
![]() | |
BasicController ()=default | |
Default constructor. More... | |
BasicController (const Containers::Wave &wavedata) | |
Filling constructor. More... | |
float | GetCurrentFraction () const |
Returns the fraction of the audio that is played. More... | |
float | GetCurrentTime () const |
Returns the current playback time in seconds. More... | |
float | GetDuration () const |
Returns the duration of the audio buffer in seconds. This function will return 0 if data is not set. More... | |
float | GetVolume () const |
Returns the current volume of the playback. More... | |
bool | HasData () const |
Returns whether this controller has data. More... | |
bool | IsFinished () const |
Whether the audio is finished playing. More... | |
bool | IsLooping () const |
Whether the audio is being looped. More... | |
bool | IsPlaying () const |
Whether the audio is being played right now. More... | |
BasicController & | Loop () |
Plays this sound. More... | |
BasicController & | Pause () |
Pauses the playback. More... | |
BasicController & | Play () |
Plays this sound. More... | |
void | ReleaseData () |
Releases the data being played by this controller. More... | |
BasicController & | Reset () |
Resets the playback to the beginning of the buffer. This function will not stop the playback. More... | |
BasicController & | Seek (float target) |
Changes the point of playback to the given time in seconds. More... | |
BasicController & | SeekTo (float target) |
Changes the point of playback to the given time in fraction: 1 would be the end of buffer. More... | |
void | SetData (const Containers::Wave &wavedata) |
Sets the data to be played by this controller. More... | |
BasicController & | SetVolume (float volume) |
Changes the volume of the playback. More... | |
![]() | |
Controller () | |
Default constructor. More... | |
virtual | ~Controller () |
Additional Inherited Members | |
![]() | |
virtual void | datachanged () |
Override this function to detect changes in the wave data. More... | |
![]() | |
const Containers::Wave * | wavedata |
Contains the data for this controller. More... | |
Positional controller allows sounds to be played at a specific location.
This helps user to identify to location of the sound source. However, in games, it would be a better idea to consider advanced positional controller as it enables sound lag due to distance and doppler shift. These would add to the realism of the sound. If there is mono channel in the audio data, this controller will exclusively use mono data and optionally low frequency data. If mono channel does not exists, this controller will mix all channels except low frequency and playback the mixed data. If there is no low frequency speaker in the config, low frequency data will be mixed into the output data.
|
default |
Default constructor.
PositionalController | ( | const Containers::Wave & | wavedata | ) |
Filling constructor.
Geometry::Point3D GetLocation | ( | ) | const |
void Move | ( | const Geometry::Point3D & | target | ) |
void Move | ( | const Geometry::Pointf & | target | ) |
|
overridevirtual |
Returns the type of the controller.
Reimplemented from BasicController.
References Gorgon::Audio::Basic.