TB2026-YDS Firmware
Loading...
Searching...
No Matches
mp3_frame.h
Go to the documentation of this file.
1
16#pragma once
17
18#include <stdint.h>
19#include <stdbool.h>
20#include <stddef.h>
21
23typedef struct {
24 uint32_t rate_hz;
25 uint32_t bitrate_bps;
27 uint8_t channels;
30
39bool mp3_frame_parse(const uint8_t *p, size_t len, mp3_frame_hdr_t *out);
40
49uint32_t mp3_xing_duration_ms(const uint8_t *frame, size_t len, const mp3_frame_hdr_t *hdr);
bool mp3_frame_parse(const uint8_t *p, size_t len, mp3_frame_hdr_t *out)
Parse a 4-byte MPEG Layer III frame header at p.
Definition mp3_frame.c:23
uint32_t mp3_xing_duration_ms(const uint8_t *frame, size_t len, const mp3_frame_hdr_t *hdr)
Track duration from a Xing/Info/VBRI tag in the first frame, if present.
Definition mp3_frame.c:57
Decoded fields of one MPEG Layer III frame header.
Definition mp3_frame.h:23
uint8_t side_info_bytes
Definition mp3_frame.h:28
uint32_t bitrate_bps
Definition mp3_frame.h:25
uint16_t samples_per_frame
Definition mp3_frame.h:26
uint8_t channels
Definition mp3_frame.h:27
uint32_t rate_hz
Definition mp3_frame.h:24