arduino-audio-tools
|
MP3 header parser to check if the data is a valid mp3 and to extract some relevant audio information. We try to find some valid frames with a valid sync in the beginning and the end. See https://www.codeproject.com/KB/audio-video/mpegaudioinfo.aspx. More...
#include <HeaderParserMP3.h>
Public Member Functions | |
int | findSyncWord (const uint8_t *buf, size_t nBytes, uint8_t synch=0xFF, uint8_t syncl=0xF0) |
Finds the mp3/aac sync word. | |
int | getBitRate () const |
FrameHeader | getFrameHeader () |
int | getFrameLength () |
Determines the frame length. | |
const char * | getLayerStr () const |
size_t | getPlayingTime (size_t fileSizeBytes) |
uint16_t | getSampleRate () const |
const char * | getVersionStr () const |
bool | isValid (const uint8_t *data, int len) |
parses the header string and returns true if this is a valid mp3 file | |
Protected Attributes | |
FrameHeader | header |
MP3 header parser to check if the data is a valid mp3 and to extract some relevant audio information. We try to find some valid frames with a valid sync in the beginning and the end. See https://www.codeproject.com/KB/audio-video/mpegaudioinfo.aspx.
|
inline |
Provides the estimated playing time in seconds based on the bitrate of the first segment