Audaspace 1.5.0
A high level audio library.
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
Sequence Class Reference

This sound represents sequenced entries to play a sound scene. More...

#include <Sequence.h>

Inheritance diagram for Sequence:
Inheritance graph
[legend]

Public Member Functions

 Sequence (Specs specs, float fps, bool muted)
 Creates a new sound scene.
 
Specs getSpecs ()
 Retrieves the audio output specification.
 
void setSpecs (Specs specs)
 Sets the audio output specification.
 
float getFPS () const
 Retrieves the scene's FPS.
 
void setFPS (float fps)
 Sets the scene's FPS.
 
void mute (bool muted)
 Sets the muting state of the scene.
 
bool isMuted () const
 Retrieves the muting state of the scene.
 
float getSpeedOfSound () const
 Retrieves the speed of sound.
 
void setSpeedOfSound (float speed)
 Sets the speed of sound.
 
float getDopplerFactor () const
 Retrieves the doppler factor.
 
void setDopplerFactor (float factor)
 Sets the doppler factor.
 
DistanceModel getDistanceModel () const
 Retrieves the distance model.
 
void setDistanceModel (DistanceModel model)
 Sets the distance model.
 
AnimateablePropertygetAnimProperty (AnimateablePropertyType type)
 Retrieves one of the animated properties of the sound.
 
std::shared_ptr< SequenceEntryadd (std::shared_ptr< ISound > sound, double begin, double end, double skip)
 Adds a new entry to the scene.
 
void remove (std::shared_ptr< SequenceEntry > entry)
 Removes an entry from the scene.
 
std::shared_ptr< IReadercreateQualityReader (ResampleQuality quality)
 Creates a new reader with indicated resampling quality.
 
virtual std::shared_ptr< IReadercreateReader ()
 Creates a reader for playback of the sound source.
 
- Public Member Functions inherited from ISound
virtual ~ISound ()
 Destroys the sound.
 

Friends

class SequenceReader
 

Detailed Description

This sound represents sequenced entries to play a sound scene.

Constructor & Destructor Documentation

◆ Sequence()

Sequence::Sequence ( Specs specs,
float fps,
bool muted )

Creates a new sound scene.

Parameters
specsThe output audio data specification.
fpsThe FPS of the scene.
mutedWhether the whole scene is muted.

Member Function Documentation

◆ add()

std::shared_ptr< SequenceEntry > Sequence::add ( std::shared_ptr< ISound > sound,
double begin,
double end,
double skip )

Adds a new entry to the scene.

Parameters
soundThe sound this entry should play.
beginThe start time.
endThe end time or a negative value if determined by the sound.
skipHow much seconds should be skipped at the beginning.
Returns
The entry added.

◆ createQualityReader()

std::shared_ptr< IReader > Sequence::createQualityReader ( ResampleQuality quality)

Creates a new reader with indicated resampling quality.

Parameters
qualityThe resampling quality.
Returns
The new reader.

◆ createReader()

virtual std::shared_ptr< IReader > Sequence::createReader ( )
virtual

Creates a reader for playback of the sound source.

Returns
A pointer to an IReader object or nullptr if there has been an error.
Exceptions
ExceptionAn exception may be thrown if there has been a more unexpected error during reader creation.

Implements ISound.

◆ getAnimProperty()

AnimateableProperty * Sequence::getAnimProperty ( AnimateablePropertyType type)

Retrieves one of the animated properties of the sound.

Parameters
typeWhich animated property to retrieve.
Returns
A pointer to the animated property, valid as long as the sound is.

◆ getDistanceModel()

DistanceModel Sequence::getDistanceModel ( ) const

Retrieves the distance model.

Returns
The distance model.

◆ getDopplerFactor()

float Sequence::getDopplerFactor ( ) const

Retrieves the doppler factor.

This value is a scaling factor for the velocity vectors of sources and listener which is used while calculating the doppler effect.

Returns
The doppler factor.

◆ getFPS()

float Sequence::getFPS ( ) const

Retrieves the scene's FPS.

Returns
The scene's FPS.

◆ getSpecs()

Specs Sequence::getSpecs ( )

Retrieves the audio output specification.

Returns
The specification.

◆ getSpeedOfSound()

float Sequence::getSpeedOfSound ( ) const

Retrieves the speed of sound.

This value is needed for doppler effect calculation.

Returns
The speed of sound.

◆ isMuted()

bool Sequence::isMuted ( ) const

Retrieves the muting state of the scene.

Returns
Whether the scene is muted.

◆ mute()

void Sequence::mute ( bool muted)

Sets the muting state of the scene.

Parameters
mutedWhether the scene is muted.

◆ remove()

void Sequence::remove ( std::shared_ptr< SequenceEntry > entry)

Removes an entry from the scene.

Parameters
entryThe entry to remove.

◆ setDistanceModel()

void Sequence::setDistanceModel ( DistanceModel model)

Sets the distance model.

Parameters
modeldistance model.

◆ setDopplerFactor()

void Sequence::setDopplerFactor ( float factor)

Sets the doppler factor.

This value is a scaling factor for the velocity vectors of sources and listener which is used while calculating the doppler effect.

Parameters
factorThe new doppler factor.

◆ setFPS()

void Sequence::setFPS ( float fps)

Sets the scene's FPS.

Parameters
fpsThe new FPS.

◆ setSpecs()

void Sequence::setSpecs ( Specs specs)

Sets the audio output specification.

Parameters
specsThe new specification.

◆ setSpeedOfSound()

void Sequence::setSpeedOfSound ( float speed)

Sets the speed of sound.

This value is needed for doppler effect calculation.

Parameters
speedThe new speed of sound.

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