22 const uint8_t
riff[] = {
'R',
'I',
'F',
'F' };
23 const uint8_t
wave[] = {
'W',
'A',
'V',
'E' };
24 const uint8_t
fmt[] = {
'f' ,
'm',
't',
' ' };
25 const uint8_t
fact[] = {
'f',
'a',
'c',
't' };
26 const uint8_t
data[] = {
'd',
'a',
't',
'a' };
34 memset(wh, 0,
sizeof(*wh));
144 RF_WAVHEADER_UNKNOWN);
168 wh->
byte_rate = sfreq * bytes_per_sample * num_channels;
199 #define C(x) case RF_WAVHEADER_##x: return #x
213 return strdup_printf(
"WAVE file: %d samples in %s %dch %dHz",
void rf_pack_u16le(rf_pack_t *pack, uint16_t u16)
void rf_pack_u32le(rf_pack_t *pack, uint32_t u32)
void rf_pack_bytes(rf_pack_t *pack, void *p, unsigned int sz)
int rf_pack_remaining(rf_pack_t *pack)
uint32_t rf_unpack_u32le(rf_pack_t *pack)
uint16_t rf_unpack_u16le(rf_pack_t *pack)
void rf_pack_init(rf_pack_t *pack, void *p, unsigned int sz)
char * strdup_printf(const char *format,...)
void rf_unpack_bytes(rf_pack_t *pack, void *p, unsigned int sz)