#include <sound.h>
Inheritance diagram for DummySoundManager:
Collaboration diagram for DummySoundManager:Public Member Functions | |
| void | step (f32 dtime) override |
| Removes finished sounds, steps streamed sounds, and does similar tasks. | |
| void | pauseAll () override |
| Pause all sound playback. | |
| void | resumeAll () override |
| Resume sound playback after pause. | |
| void | updateListener (const v3f &pos, const v3f &vel, const v3f &at, const v3f &up) override |
| void | setListenerGain (f32 gain) override |
| bool | loadSoundFile (const std::string &name, const std::string &filepath) override |
| Adds a sound to load from a file (only OggVorbis). | |
| bool | loadSoundData (const std::string &name, std::string &&filedata) override |
Same as loadSoundFile, but reads the OggVorbis file from memory. | |
| void | addSoundToGroup (const std::string &sound_name, const std::string &group_name) override |
Adds sound with name sound_name to group group_name. | |
| void | playSound (sound_handle_t id, const SoundSpec &spec) override |
| Plays a random sound from a sound group (position-less). | |
| void | playSoundAt (sound_handle_t id, const SoundSpec &spec, const v3f &pos, const v3f &vel) override |
Same as playSound, but at a position. | |
| void | stopSound (sound_handle_t sound) override |
| Request the sound to be stopped. | |
| void | fadeSound (sound_handle_t sound, f32 step, f32 target_gain) override |
| void | updateSoundPosVel (sound_handle_t sound, const v3f &pos, const v3f &vel) override |
| Update position and velocity of positional sound. | |
Public Member Functions inherited from ISoundManager | |
| virtual | ~ISoundManager ()=default |
| std::vector< sound_handle_t > | pollRemovedSounds () |
| Get and reset the list of sounds that were stopped. | |
| sound_handle_t | allocateId (u32 num_owners) |
| Returns a positive id. | |
| void | freeId (sound_handle_t id, u32 num_owners=1) |
| Free an id allocated via allocateId. | |
Additional Inherited Members | |
Protected Member Functions inherited from ISoundManager | |
| void | reportRemovedSound (sound_handle_t id) |
|
inlineoverridevirtual |
Adds sound with name sound_name to group group_name.
Creates the group if non-existent.
| sound_name | The name of the sound, as used in loadSoundData. |
| group_name | The name of the sound group. |
Implements ISoundManager.
|
inlineoverridevirtual |
Implements ISoundManager.
|
inlineoverridevirtual |
Same as loadSoundFile, but reads the OggVorbis file from memory.
Implements ISoundManager.
|
inlineoverridevirtual |
Adds a sound to load from a file (only OggVorbis).
| name | The name of the sound. Must be unique, otherwise call fails. |
| filepath | The path for |
Implements ISoundManager.
|
inlineoverridevirtual |
Pause all sound playback.
Implements ISoundManager.
|
inlineoverridevirtual |
Plays a random sound from a sound group (position-less).
| id | Id for new sound. Move semantics apply if id > 0. |
Implements ISoundManager.
References ISoundManager::reportRemovedSound().
Here is the call graph for this function:
|
inlineoverridevirtual |
Same as playSound, but at a position.
| pos | In node-space. |
| vel | In node-space. |
Implements ISoundManager.
References ISoundManager::reportRemovedSound().
Here is the call graph for this function:
|
inlineoverridevirtual |
Resume sound playback after pause.
Implements ISoundManager.
|
inlineoverridevirtual |
Implements ISoundManager.
|
inlineoverridevirtual |
Removes finished sounds, steps streamed sounds, and does similar tasks.
Should not be called while paused.
| dtime | In seconds. |
Implements ISoundManager.
|
inlineoverridevirtual |
|
inlineoverridevirtual |
| pos | In node-space. |
| vel | In node-space. |
| at | Vector in node-space pointing forwards. |
| up | Vector in node-space pointing upwards, orthogonal to at. |
Implements ISoundManager.
|
inlineoverridevirtual |
Update position and velocity of positional sound.
| pos | In node-space. |
| vel | In node-space. |
Implements ISoundManager.