libdragon
include
wav64internal.h
1
#ifndef __LIBDRAGON_WAV64_INTERNAL_H
2
#define __LIBDRAGON_WAV64_INTERNAL_H
3
4
#define WAV64_ID "WV64"
5
#define WAV64_FILE_VERSION 2
6
#define WAV64_FORMAT_RAW 0
7
9
typedef
struct
__attribute__((packed)) {
10
char
id
[4];
11
int8_t
version
;
12
int8_t
format
;
13
int8_t
channels
;
14
int8_t
nbits
;
15
int32_t
freq
;
16
int32_t
len
;
17
int32_t
loop_len
;
18
int32_t
start_offset
;
19
}
wav64_header_t
;
20
21
_Static_assert(
sizeof
(
wav64_header_t
) == 24,
"invalid wav64_header size"
);
22
23
typedef
struct
samplebuffer_s
samplebuffer_t
;
24
30
void
raw_waveform_read
(
samplebuffer_t
*sbuf,
int
base_rom_addr,
int
wpos,
int
wlen,
int
bps);
31
32
#endif
samplebuffer_t
Definition:
samplebuffer.h:82
wav64_header_t
Header of a WAV64 file.
Definition:
wav64internal.h:9
wav64_header_t::channels
int8_t channels
Number of interleaved channels.
Definition:
wav64internal.h:13
wav64_header_t::version
int8_t version
Version of the file (WAV64_FILE_VERSION)
Definition:
wav64internal.h:11
wav64_header_t::format
int8_t format
Format of the file (WAV64_FORMAT_RAW)
Definition:
wav64internal.h:12
wav64_header_t::nbits
int8_t nbits
Width of sample in bits (8 or 16)
Definition:
wav64internal.h:14
wav64_header_t::freq
int32_t freq
Default playback frequency.
Definition:
wav64internal.h:15
wav64_header_t::start_offset
int32_t start_offset
Offset of the first sample in the file.
Definition:
wav64internal.h:18
wav64_header_t::len
int32_t len
Length of the file (in samples)
Definition:
wav64internal.h:16
wav64_header_t::loop_len
int32_t loop_len
Length of the loop since file end (or 0 if no loop)
Definition:
wav64internal.h:17
raw_waveform_read
void raw_waveform_read(samplebuffer_t *sbuf, int base_rom_addr, int wpos, int wlen, int bps)
Utility function to help implementing WaveformRead for uncompressed (raw) samples.
Definition:
wav64.c:27
Generated on Wed Apr 24 2024 23:02:50 for libdragon by
1.9.4