Class AudioAnalyzerTaglibManager

Class Documentation

class AudioAnalyzerTaglibManager

Audio Analyzer Player Source.

This class will be used to load audio from a disk file and interact with it using the most basic player options (play/stop/pause)

Public Functions

AudioAnalyzerTaglibManager()

Constructor

~AudioAnalyzerTaglibManager()

Destructor This will unload the loaded audio too

AudioAnalyzerTaglibManager(AudioAnalyzerTaglibManager const &x) = delete

Disable copy constructor

Parameters

x

void operator=(AudioAnalyzerTaglibManager const &x) = delete

Disable copy assignment

Parameters

x

void setFileInfo(const std::string fileName, const std::string fileExtension)

Sets filename and extension

Parameters
  • fileName – filename

  • fileExtension – extension

inline const AUDIOFILE_METADATA *getMetadata() const

Get Metadata structure

Returns

metadata structure

void loadMetadataFromMemory(char *dataPtr, unsigned int dataSize)

Extract audio metadata from memory pointer

Parameters
  • dataPtr – Pointer to the file data in memory

  • dataSize – Size of the file memory data (bytes)

struct AUDIOFILE_METADATA

Audio metadata structure.

Public Members

std::string fileName

player filename

std::string fileExtension

player filename extension

std::string metatype

metadata Type

std::string title

title

std::string artist

artist

std::string album

album

std::string year

year

std::string genre

genre

std::vector<std::unique_ptr<MetadataArt>> pictures

data picture array

class MetadataArt

Audio art metadata structure.

Public Functions

MetadataArt()

Constructor

MetadataArt(const std::string &ext, std::size_t buffer_size, char *buffer)

Constructor with parameters

Parameters
  • ext – Extension of the image file

  • buffer_size – Size of the image data

  • buffer – Image data

~MetadataArt()

Destructor

MetadataArt(MetadataArt const &x) = delete

Disable copy constructor

Parameters

x

void operator=(MetadataArt const &x) = delete

Disable copy assignment

Parameters

x

inline const std::string &getExtension() const

Returns the image file extension

Returns

File extension

inline const std::size_t &getBufferSize() const

Returns the image buffer size

Returns

Buffer size

inline const char *getBuffer() const

Returns the image buffer

Returns

Buffer

Protected Attributes

std::string _extension

Picture image format

std::size_t _size

Size of the image file

char *_data

Binary file