Class AudioAnalyzerDecoder

Class Documentation

class AudioAnalyzerDecoder

Audio Analyzer Player Decoder.

This class will be used to extract the audio info from the header of the file

Public Types

enum AudioFileType

Enum for Bigendian/LittleEndian options

Values:

enumerator None
enumerator WAV
enumerator MP3
enumerator OGG
enumerator FLAC

Public Functions

AudioAnalyzerDecoder()

Constructor

~AudioAnalyzerDecoder()

Destructor

AudioAnalyzerDecoder(AudioAnalyzerDecoder const &x) = delete

Disable copy constructor

Parameters

x

void operator=(AudioAnalyzerDecoder const &x) = delete

Disable copy assignment

Parameters

x

bool loadAudioInfo(const FString &filePath, bool onlyHeader = false)

Extracts audio info from a wav file

Parameters
  • filePath – Path to the wav file

  • onlyHeader – Decode only header to retrieve metadata info

Returns

Extraction execution result

void moveAudioInfo(std::unique_ptr<AUDIOFILE_INFO> &destination)

Moves the pointer reference of the audio info to a new pointer

Parameters

destination[out] Pointer destination

inline const AudioFileType &getAudioFileType() const

Returns the header file type

Returns

AudioFileType

void getMetadata(FString &Filename, FString &Extension, FString &MetaType, FString &Title, FString &Artist, FString &Album, FString &Year, FString &Genre)

Returns the file metadata

Parameters
  • Filename[out] Filename of the audio file

  • Extension[out] Extension of the audio file

  • MetaType[out] ID3_V1 | ID3_V2.3 | ID3_V2.4

  • Title[out] Title of the song

  • Artist[out] Artist

  • Album[out] Album

  • Year[out] Year

  • Genre[out] Genre

void getMetadataArt(const FString &Prefix, const FString &Folder, int32 &NumberOfPictures)

Extract the AlbumArt pictures into the selected folder. Prefix1.png, Prefix2.png,…

Parameters
  • Prefix – Prefix used to name the pictures.

  • Folder – Destination folder

  • NumberOfPictures[out] Number of stored pictures

inline bool hasOnlyHeader() const

Returns if only has been loaded the header data

Returns

Has onkly header data

void setEnableMetadataLoad(bool enableMetadataLoad)

Enables or disables metadata load

Parameters

enableMetadataLoad – Enable metadata load

void freePCMdata()

Free buffer data and metadata