96 virtual void seek(std::uint64_t sampleOffset) = 0;
107 [[nodiscard]]
virtual std::uint64_t
read(std::int16_t* samples, std::uint64_t maxCount) = 0;
Abstract base class for sound file decoding.
virtual std::optional< Info > open(InputStream &stream)=0
Open a sound file for reading.
virtual ~SoundFileReader()=default
Virtual destructor.
virtual void seek(std::uint64_t sampleOffset)=0
Change the current read position to the given sample offset.
virtual std::uint64_t read(std::int16_t *samples, std::uint64_t maxCount)=0
Read audio samples from the open file.
Structure holding the audio properties of a sound file.
unsigned int sampleRate
Samples rate of the sound, in samples per second.
std::uint64_t sampleCount
Total number of samples in the file.
std::vector< SoundChannel > channelMap
Map of position in sample frame to sound channel.
unsigned int channelCount
Number of channels of the sound.