105 virtual std::vector<Sample>
readSome(
size_t len)
const = 0;
106 virtual void writeSome(
const std::vector<Sample> vFrames) = 0;
This class represents a generic audio file with reading and writing functionalities.
virtual Sample read() const =0
virtual bool isSeekable() const
Audio files, which inherit from this class do not have any seeking functionality.
virtual size_t getChannels() const =0
virtual size_t getLength() const =0
virtual size_t getSampleRate() const =0
virtual void write(const Sample &frame)=0
virtual void setSampleRate(size_t freq)=0
virtual void setChannels(size_t channels)=0
virtual bool isValid() const =0
This class extends the generic audio file with seeking functionalities as well as possibilities for r...
virtual bool isSeekable() const override
Overrides the base classes member function to signal the possibility to safely up-cast to this class.
virtual size_t getPosition() const =0
virtual std::vector< Sample > readSome(size_t len) const =0
virtual void setPosition(size_t pos)=0
virtual void writeSome(const std::vector< Sample > vFrames)=0
File * getAudioFileByType(const std::string &sFileName)
Return a audio file type depending on the file extension or a nullptr if the file type is not support...
Defines a sample in the audio stream, i.e. a single value per channel.
Sample(double _left, double _right)