Loading...
Searching...
No Matches
SoundStream.hpp
Go to the documentation of this file.
7// In no event will the authors be held liable for any damages arising from the use of this software.
244 void initialize(unsigned int channelCount, unsigned int sampleRate, const std::vector<SoundChannel>& channelMap);
std::function< void(const float *inputFrames, unsigned int &inputFrameCount, float *outputFrames, unsigned int &outputFrameCount, unsigned int frameChannelCount)> EffectProcessor
Callable that is provided with sound data for processing.
Definition SoundSource.hpp:154
void setLooping(bool loop)
Set whether or not the stream should loop after reaching the end.
std::vector< SoundChannel > getChannelMap() const
Get the map of position in sample frame to sound channel.
unsigned int getChannelCount() const
Return the number of channels of the stream.
void initialize(unsigned int channelCount, unsigned int sampleRate, const std::vector< SoundChannel > &channelMap)
Define the audio stream parameters.
Status getStatus() const override
Get the current status of the stream (stopped, paused, playing)
void setEffectProcessor(EffectProcessor effectProcessor) override
Set the effect processor to be applied to the sound.
unsigned int getSampleRate() const
Get the stream sample rate of the stream.
virtual void onSeek(Time timeOffset)=0
Change the current playing position in the stream source.
virtual bool onGetData(Chunk &data)=0
Request a new chunk of audio samples from the stream source.
virtual std::optional< std::uint64_t > onLoop()
Change the current playing position in the stream source to the beginning of the loop.
Time getPlayingOffset() const
Get the current playing position of the stream.
void setPlayingOffset(Time timeOffset)
Change the current playing position of the stream.
SoundChannel
Types of sound channels that can be read/written from sound buffers/files.
Definition SoundChannel.hpp:42
Definition AudioResource.hpp:36
Structure defining a chunk of audio data to stream.
Definition SoundStream.hpp:59