1#ifndef __EO_UTILS_FLACFILE_H__
2#define __EO_UTILS_FLACFILE_H__
35 FLACFile(
const std::string& pFilenam, uint32_t pCompressionLevel);
92 void close()
override;
97 bool isOpen()
const override;
193 void* mDecoder =
nullptr;
194 void* mEncoder =
nullptr;
198 std::vector<std::vector<int32_t>> mReadBuffer;
199 size_t mReadBufferChannel;
200 size_t mReadBufferSample;
203 std::vector<int32_t> mWriteBuffer;
206 uint64_t mDecodePosition;
212 AudioFileResultType setVorbisComment(
const std::string& pTagName,
const std::string& pValue);
213 AudioFileResultType getVorbisComment(
const std::string& pTagName, std::string& pValue)
const;
Definition AudioFileInfo.h:14
Definition AudioFileResultType.h:13
Holds metadata for FLAC audio files.
Definition FLACFileInfo.h:17
AudioFileInfo getAudioFileInfo() const override
Returns an AudioFile object with information about the audio file.
Definition FLACFile.cpp:651
FLACFile(const std::string &pFilename)
Constructor for opening an existing FLAC file for reading, which just takes the filename.
uint32_t CompressionLevel() const
Returns the compression level currently set for the FLAC file.
Definition FLACFile.cpp:207
void close() override
Closes the FLAC file.
Definition FLACFile.cpp:381
AudioFileResultType getAlbum(std::string &pAlbum) const override
Gets the album metadata tag.
Definition FLACFile.cpp:867
AudioFileResultType getComment(std::string &pComment) const override
Gets the comment metadata tag.
Definition FLACFile.cpp:911
int64_t maxValueForSampleSize() const override
Returns the maximum possible positive value of the audio file's sample size.
Definition FLACFile.cpp:619
AudioFileResultType getArtist(std::string &pArtist) const override
Gets the artist metadata tag.
Definition FLACFile.cpp:862
FLACFile(const std::string &pFilenam, uint32_t pCompressionLevel)
Constructor for opening an existing FLAC file for reading, which takes the filename and a compression...
const FLACFileInfo & getFileInfo() const
Returns a FLACFileInfo object with information about the FLAC file.
Definition FLACFile.cpp:410
AudioFileResultType setComment(const std::string &pComment) override
Sets the comment metadata tag.
Definition FLACFile.cpp:850
AudioFileResultType open(AudioFileModes pOpenMode) override
Opens the audio file in the given mode (read, write, or read/write).
Definition FLACFile.cpp:217
AudioFileResultType getTitle(std::string &pTitle) const override
Gets the title metadata tag.
Definition FLACFile.cpp:857
void seekOutputToSampleNum(size_t pSampleNum) override
Returns the maximum possible positive value of the audio file's sample size.
Definition FLACFile.cpp:636
AudioFileResultType getHighestSampleValue_int64(int64_t &pHighestAudioSample) override
Gets the highest audio sample value from the file, cast to a 64-bit integer.
Definition FLACFile.cpp:543
AudioFileResultType setTitle(const std::string &pTitle) override
Sets the title metadata tag.
Definition FLACFile.cpp:817
void setAudioFileInfo(const AudioFileInfo &pAudioFileInfo) override
Sets the audio file info for the FLAC file.
Definition FLACFile.cpp:202
AudioFileResultType setTrackNumber(uint32_t pTrackNumber, uint32_t pTotalTracks=0) override
Sets the track number metadata tag.
Definition FLACFile.cpp:837
AudioFileResultType setGenre(const std::string &pGenre) override
Sets the genre metadata tag.
Definition FLACFile.cpp:832
AudioFileResultType setArtist(const std::string &pArtist) override
Sets the artist metadata tag.
Definition FLACFile.cpp:822
AudioFileResultType getGenre(std::string &pGenre) const override
Gets the genre metadata tag.
Definition FLACFile.cpp:872
FLACFile(const std::string &pFilename, const FLACFileInfo &pFLACFileInfo)
Constructor for opening an existing FLAC file for reading.
~FLACFile()
Definition FLACFile.cpp:197
AudioFileResultType getTrackNumber(uint32_t &pTrackNumber, uint32_t &pTotalTracks) const override
Gets the track number metadata tag.
Definition FLACFile.cpp:877
AudioFileResultType setYear(const std::string &pYear) override
Sets the year/date metadata tag.
Definition FLACFile.cpp:845
AudioFileResultType goToAudioDataPos() override
Goes to the audio data position in the audio file.
Definition FLACFile.cpp:579
FLACFile(const std::string &pFilename, AudioFileModes pFileMode)
Constructor for opening a FLAC file for reading or writing.
bool isOpen() const override
Returns whether the FLAC file is open (and also has its encoder and/or decoder initialized).
Definition FLACFile.cpp:364
AudioFileResultType writeSample_int64(int64_t pAudioSample) override
Writes an audio sample to the file. The parameter is a 64-bit integer but will be cast to the bitness...
Definition FLACFile.cpp:490
AudioFileResultType getNextSample_int64(int64_t &pAudioSample) override
Gets the next sample from the file, cast to a 64-bit integer.
Definition FLACFile.cpp:415
size_t numSamples() const override
Returns the number of audio samples in the audio file.
Definition FLACFile.cpp:603
AudioFileResultType getYear(std::string &pYear) const override
Gets the year/date metadata tag.
Definition FLACFile.cpp:906
AudioFileResultType setAlbum(const std::string &pAlbum) override
Sets the album metadata tag.
Definition FLACFile.cpp:827
Definition StringUtils.cpp:6
AudioFileModes
Definition AudioFile.h:15
Used by FLAC decoder callbacks (same layout as FLAC client data).
Definition FLACFile.h:180
AudioFileResultType * result
Definition FLACFile.h:186
size_t * readChannel
Definition FLACFile.h:184
std::vector< std::vector< int32_t > > * readBuffer
Definition FLACFile.h:183
size_t * readSample
Definition FLACFile.h:185
std::fstream * stream
Definition FLACFile.h:181
FLACFileInfo * fileInfo
Definition FLACFile.h:182