class
Audio
Provides global functionality relating to sounds and music.
Public
Methods
~Audio
Play
Starts playback of the provided audio clip.
This can be used for a quicker way of creating audio sources if you don't need the full control provided by creating AudioSource manually.
- clip
- Audio clip to play.
- position
- Position in world space to play the clip at. Only relevant if the clip is 3D.
- volume
- Volume to play the clip at.
SetVolume
Determines global audio volume.
In range [0, 1].
GetVolume
SetPaused
Determines if audio reproduction is paused globally.
IsPaused
SetActiveDevice
Determines the device on which is the audio played back on.
GetActiveDevice
GetDefaultDevice
Returns the default audio device identifier.
GetAllDevices
Returns a list of all available audio devices.
staticInstance
Returns a reference to the module instance.
Module has to have been started up first otherwise an exception will be thrown.
staticInstancePtr
Returns a pointer to the module instance.
Module has to have been started up first otherwise an exception will be thrown.
staticShutDown
Shuts down this module and frees any resources it is using.
staticIsStarted
Query if the module has been started.
Internal
Methods
Update
Called once per frame.
Queues streaming audio requests.
Protected
Methods
CreateClip
Creates a new audio clip.
- samples
- Stream containing audio samples in format specified in .
- streamSize
- Size of the audio data in the provided stream, in bytes.
- sampleCount
- Number of samples in stream.
- createInformation
- Descriptor describing the type of the audio stream (format, sample rate, etc.).
Returns: Newly created AudioClip. Must be manually initialized.
CreateListener
Creates a new AudioListener.
StopManualSources
Stops playback of all sources started with Audio::Play calls.
~Module<T>
OnStartUp
Override if you want your module to be notified once it has been constructed and started.
OnShutDown
Override if you want your module to be notified just before it is deleted.
staticInstanceInternal
Returns a singleton instance of this module.