19 lines
333 B
C
19 lines
333 B
C
#ifndef WAV_H
|
|
#define WAV_H
|
|
|
|
#include <stdio.h>
|
|
#include <stdint.h>
|
|
|
|
typedef struct {
|
|
FILE *file;
|
|
uint32_t sample_rate;
|
|
uint32_t samples_written;
|
|
} wav_t;
|
|
|
|
int wave_open(wav_t *wav, const char *filename, uint32_t sample_rate);
|
|
void wave_write_sample(wav_t *wav, int16_t sample);
|
|
|
|
void wave_close(wav_t *wav);
|
|
|
|
#endif // !WAV_H
|