RavEngine
Loading...
Searching...
No Matches
RavEngine::AudioDataProvider Struct Referenceabstract
Inheritance diagram for RavEngine::AudioDataProvider:
[legend]
Collaboration diagram for RavEngine::AudioDataProvider:
[legend]

Public Member Functions

virtual void ProvideBufferData (PlanarSampleBufferInlineView &out_buffer, PlanarSampleBufferInlineView &effectScratchBuffer)=0
 
 AudioDataProvider (uint16_t nsamples, uint8_t nchannels)
 
virtual void Play ()
 
virtual void Pause ()
 
virtual void Restart ()=0
 
float GetVolume () const
 
void SetVolume (float vol)
 
void SetLoop (bool loop)
 
bool IsPlaying () const
 

Public Attributes

SingleAudioRenderBuffer renderData
 
float volume = 1
 
bool loops: 1 = false
 
bool isPlaying: 1 = false
 

Member Function Documentation

◆ IsPlaying()

bool RavEngine::AudioDataProvider::IsPlaying ( ) const
inline
Returns
true if the source is currently playing, false otherwise

◆ Pause()

virtual void RavEngine::AudioDataProvider::Pause ( )
inlinevirtual

Stop the source if it is playing. Call Play() to resume.

Reimplemented in RavEngine::SampledAudioDataProvider.

◆ Play()

virtual void RavEngine::AudioDataProvider::Play ( )
inlinevirtual

Starts playing the audio source if it is not playing. Call Pause() to suspend it.

Reimplemented in RavEngine::SampledAudioDataProvider.

◆ ProvideBufferData()

virtual void RavEngine::AudioDataProvider::ProvideBufferData ( PlanarSampleBufferInlineView &  out_buffer,
PlanarSampleBufferInlineView &  effectScratchBuffer 
)
pure virtual

◆ Restart()

virtual void RavEngine::AudioDataProvider::Restart ( )
pure virtual

◆ SetLoop()

void RavEngine::AudioDataProvider::SetLoop ( bool  loop)
inline

Enable or disable looping for this audio source. A looping source will continuously play until manually stopped, whereas non-looping sources will automatically deactivate when finished

Parameters
loopnew loop setting

◆ SetVolume()

void RavEngine::AudioDataProvider::SetVolume ( float  vol)
inline

Change the volume for this source

Parameters
volnew volume for this source.

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