Switchboard SDK
Loading...
Searching...
No Matches
switchboard::AudioSource Class Referenceabstract

Interface class that represents a source of audio. More...

#include <AudioSource.hpp>

Public Member Functions

virtual bool isRendering ()=0
 
virtual uint32_t readRenderData (void *data, uint32_t numberOfSamples)=0
 

Detailed Description

Interface class that represents a source of audio.

AudioSource class.

Member Function Documentation

◆ isRendering()

virtual bool switchboard::AudioSource::isRendering ( )
pure virtual

Gets whether the audio source has any data to provide.

Returns
True, if the audio source can provide data, false otherwise.

◆ readRenderData()

virtual uint32_t switchboard::AudioSource::readRenderData ( void * data,
uint32_t numberOfSamples )
pure virtual

Renders the audio data into an audio buffer.

Parameters
dataPointer to the memory where the data will be written.
numberOfSamplesThe number of samples requested from the audio source.
Returns
The number of samples that was written by the audio source.