#ifndef sample_HEADER_ #define sample_HEADER_ #include "soundconfig.h" typedef struct { int len; // The number of samples in each channel. int16_t *L; // Left channel. int16_t *R; // Right channel. double gain; // Gain to apply when converting back to float. } Sample; // Load a sample. Allocates. void sample_load(Sample *s, char *path, SoundConfig *conf, int buf_size); void sample_set_data(Sample *s, float *L, float *R, int len); // Free a sample. void sample_free(Sample *s); #endif