Skip to content

File syn_wav.h

FileList > audio > syn_wav.h

Go to the source code of this file

Zero-Heap RIFF/WAVE Header Parser. More...

  • #include "../common/syn_defs.h"
  • #include <stdbool.h>
  • #include <stddef.h>
  • #include <stdint.h>

Classes

Type Name
struct SYN_WAV_Info
Parsed WAV Header Metadata.

Public Functions

Type Name
SYN_Status syn_wav_parse_header (const uint8_t * buffer, size_t buffer_size, SYN_WAV_Info * info)
Parse a RIFF/WAVE header from a memory buffer.

Macros

Type Name
define SYN_WAV_FORMAT_IMA_ADPCM 0x0011U
define SYN_WAV_FORMAT_PCM 0x0001U

Detailed Description

Provides a pure C99 zero-malloc streaming header parser for standard .wav audio container files. Supports PCM (Linear) and IMA-ADPCM compressed formats.

Public Functions Documentation

function syn_wav_parse_header

Parse a RIFF/WAVE header from a memory buffer.

SYN_Status syn_wav_parse_header (
    const uint8_t * buffer,
    size_t buffer_size,
    SYN_WAV_Info * info
) 

Parameters:

  • buffer Pointer to input byte array (at least 44 bytes).
  • buffer_size Size of available buffer bytes.
  • info Pointer to SYN_WAV_Info output struct.

Returns:

SYN_OK on success, SYN_INVALID_PARAM, or SYN_ERROR on parse fail.


Macro Definition Documentation

define SYN_WAV_FORMAT_IMA_ADPCM

#define SYN_WAV_FORMAT_IMA_ADPCM `0x0011U`

IMA ADPCM compressed audio format


define SYN_WAV_FORMAT_PCM

#define SYN_WAV_FORMAT_PCM `0x0001U`

WAVE format tags Uncompressed PCM audio format



The documentation for this class was generated from the following file src/syntropic/audio/syn_wav.h