5#ifndef __LIBDRAGON_WAV64_INTERNAL_H
6#define __LIBDRAGON_WAV64_INTERNAL_H
9#define WAV64_FILE_VERSION 2
10#define WAV64_FORMAT_RAW 0
11#define WAV64_FORMAT_VADPCM 1
12#define WAV64_FORMAT_OPUS 3
13#define WAV64_NUM_FORMATS 4
21typedef struct __attribute__((packed)) {
33_Static_assert(
sizeof(
wav64_header_t) == 24,
"invalid wav64_header size");
36typedef struct __attribute__((aligned(8))) {
41typedef struct __attribute__((packed, aligned(8))) {
Definition samplebuffer.h:82
WAV64 pluggable compression algorithm.
Definition wav64_internal.h:52
int close(int fildes)
Close a file.
Definition system.c:577
WAV64 structure.
Definition wav64.h:32
uint32_t padding1
padding1
Definition wav64_internal.h:45
int8_t channels
Number of interleaved channels.
Definition wav64_internal.h:25
int8_t version
Version of the file (WAV64_FILE_VERSION)
Definition wav64_internal.h:23
int8_t format
Format of the file (WAV64_FORMAT_RAW)
Definition wav64_internal.h:24
int8_t nbits
Width of sample in bits (8 or 16)
Definition wav64_internal.h:26
int32_t freq
Default playback frequency.
Definition wav64_internal.h:27
uint16_t padding
padding
Definition wav64_internal.h:44
int32_t start_offset
Offset of the first sample in the file.
Definition wav64_internal.h:30
int8_t npredictors
Number of predictors.
Definition wav64_internal.h:42
int32_t len
Length of the file (in samples)
Definition wav64_internal.h:28
int8_t order
Order of the predictors.
Definition wav64_internal.h:43
void raw_waveform_read(samplebuffer_t *sbuf, int fd, int wpos, int wlen, int bps)
Utility function to help implementing WaveformRead for uncompressed (raw) samples.
Definition wav64.c:59
int32_t loop_len
Length of the loop since file end (or 0 if no loop)
Definition wav64_internal.h:29
void raw_waveform_read_address(samplebuffer_t *sbuf, int rom_addr, int wpos, int wlen, int bps)
Utility function to help implementing WaveformRead for uncompressed (raw) samples.
Definition wav64.c:69
A vector of audio samples.
Definition wav64_internal.h:36