21 #include "../parallelism.h"
45 const dtime sampleRate,
47 const unsigned char numChannels,
48 const dtime maxBufferLen
78 const dtime bufferLength
108 const dtime maxBufferLen
114 const dtime bufferLength
A Source producing a sinusoidal signal, mainly for test purposes.
AudioSampleFormat sampleFormat
void render(TaskThread &thread, sample8 *buffer, const dtime bufferLength)
Renders audio data to the target output buffer given by the user.
void setClock(dtime time)
Called by the source user when an abrupt time change occurs (e.g., due to seeking)
void setFrequency(float hz)
void prepare(const dtime sampleRate, const AudioSampleFormat sampleFormat, const unsigned char numChannels, const dtime maxBufferLen)
Prepares a source to render audio data.
float getAmplitude() const
unsigned char numChannels
void setAmplitude(float amp)
void setPhase(float radians)
float getFrequency() const
Abstract source of audio signal.
virtual void setClock(dtime time)
Called by the source user when an abrupt time change occurs (e.g., due to seeking)
virtual ThreadIndex getMaxThreads()
Returns the maximum number of working threads for rendering from this source.
virtual void render(TaskThread &thread, sample8 *buffer, const dtime bufferLength)=0
Renders audio data to the target output buffer given by the user.
virtual void prepare(const dtime sampleRate, const AudioSampleFormat sampleFormat, const unsigned char numChannels, const dtime maxBufferLen)=0
Prepares a source to render audio data.
unsigned char ThreadIndex
number of threads / thread index
AudioSampleFormat
Format of audio samples.