|
RavEngine
|
#include <AudioSource.hpp>
Public Member Functions | |
| SampledAudioDataProvider (decltype(asset) a, uint8_t nchannels=1) | |
| void | SetAudio (decltype(SampledAudioDataProvider::asset) a) |
| void | Restart () final |
| void | Pause () final |
| void | Play () final |
| void | ProvideBufferData (PlanarSampleBufferInlineView &buffer, PlanarSampleBufferInlineView &scratchSpace) final |
Public Member Functions inherited from RavEngine::AudioGraphComposed | |
| void | SetGraph (decltype(effectGraph) inGraph) |
| auto | GetGraph () const |
| void | Render (PlanarSampleBufferInlineView &inputSamples, PlanarSampleBufferInlineView &intermediateBuffer, uint8_t nchannels) |
Public Member Functions inherited from RavEngine::AudioDataProvider | |
| AudioDataProvider (uint16_t nsamples, uint8_t nchannels) | |
| float | GetVolume () const |
| void | SetVolume (float vol) |
| void | SetLoop (bool loop) |
| bool | IsPlaying () const |
Public Attributes | |
| Ref< AudioAsset > | asset |
| uint64_t | lastPlayTime = 0 |
Public Attributes inherited from RavEngine::AudioDataProvider | |
| SingleAudioRenderBuffer | renderData |
| float | volume = 1 |
| bool | loops: 1 = false |
| bool | isPlaying: 1 = false |
Additional Inherited Members | |
Public Types inherited from RavEngine::AudioGraphComposed | |
| using | effect_graph_ptr_t = Ref< AudioGraphAsset > |
Player for AudioAssets
|
finalvirtual |
Stop the source if it is playing. Call Play() to resume.
Reimplemented from RavEngine::AudioDataProvider.
|
finalvirtual |
Starts playing the audio source if it is not playing. Call Pause() to suspend it.
Reimplemented from RavEngine::AudioDataProvider.
|
finalvirtual |
Get the next region, accounting for looping and volume, of the current track. The playhead advances buffer.size() % (loops? numsamples : 1). If the next region is shorter than the remaining space in the buffer, that space is filled with 0.
| buffer | output destination |
Implements RavEngine::AudioDataProvider.
|
finalvirtual |
Reset the audio playhead to the beginning of this source. This does not trigger it to begin playing.
Implements RavEngine::AudioDataProvider.
|
inline |
Change the audio asset in this player
| a | the audio asset |