Loading...
Searching...
No Matches
InputSoundFile.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.
InputSoundFile(const std::filesystem::path &filename)
Construct a sound file from the disk for reading.
bool openFromStream(InputStream &stream)
Open a sound file from a custom stream for reading.
InputSoundFile(const void *data, std::size_t sizeInBytes)
Construct a sound file in memory for reading.
bool openFromFile(const std::filesystem::path &filename)
Open a sound file from the disk for reading.
bool openFromMemory(const void *data, std::size_t sizeInBytes)
Open a sound file in memory for reading.
unsigned int getChannelCount() const
Get the number of channels used by the sound.
std::uint64_t getSampleCount() const
Get the total number of audio samples in the file.
unsigned int getSampleRate() const
Get the sample rate of the sound.
std::uint64_t getSampleOffset() const
Get the read offset of the file in samples.
void seek(Time timeOffset)
Change the current read position to the given time offset.
InputSoundFile(InputStream &stream)
Construct a sound file from a custom stream for reading.
const std::vector< SoundChannel > & getChannelMap() const
Get the map of position in sample frame to sound channel.
std::uint64_t read(std::int16_t *samples, std::uint64_t maxCount)
Read audio samples from the open file.
void seek(std::uint64_t sampleOffset)
Change the current read position to the given sample offset.
Definition AudioResource.hpp:36