TB2026-YDS Firmware
Loading...
Searching...
No Matches
decoder_backend_t Struct Reference

One format backend (MP3 or WAV). Single-stream: one open at a time. More...

#include <decoder_backend.h>

Data Fields

esp_err_t(* open )(FILE *f, decoder_format_t *fmt)
esp_err_t(* read )(void *pcm, size_t cap_bytes, size_t *got_bytes)
void(* close )(void)

Detailed Description

One format backend (MP3 or WAV). Single-stream: one open at a time.

Field Documentation

◆ close

void(* decoder_backend_t::close) (void)

Free backend state. Does not close the FILE* (the facade owns it).

◆ open

esp_err_t(* decoder_backend_t::open) (FILE *f, decoder_format_t *fmt)

Read the header from f (positioned at byte 0) and fill fmt; init backend state.

◆ read

esp_err_t(* decoder_backend_t::read) (void *pcm, size_t cap_bytes, size_t *got_bytes)

Decode the next chunk into pcm; *got_bytes is 0 at end of file.


The documentation for this struct was generated from the following file: