Skip to content

File syn_wav.c

FileList > audio > syn_wav.c

Go to the source code of this file

Implementation of RIFF/WAVE Header Parser.

  • #include "syn_wav.h"
  • #include <string.h>

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.

Public Static Functions

Type Name
uint16_t peek_u16_le (const uint8_t * p)
Read unsigned 16-bit little-endian integer from byte stream.
uint32_t peek_u32_le (const uint8_t * p)
Read unsigned 32-bit little-endian integer from byte stream.

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.


Public Static Functions Documentation

function peek_u16_le

Read unsigned 16-bit little-endian integer from byte stream.

static inline uint16_t peek_u16_le (
    const uint8_t * p
) 

Parameters:

  • p Pointer to byte stream.

Returns:

Unsigned 16-bit integer value.


function peek_u32_le

Read unsigned 32-bit little-endian integer from byte stream.

static inline uint32_t peek_u32_le (
    const uint8_t * p
) 

Parameters:

  • p Pointer to byte stream.

Returns:

Unsigned 32-bit integer value.



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