21 lines
459 B
C
21 lines
459 B
C
#ifndef sample_HEADER_
|
|
#define sample_HEADER_
|
|
|
|
#include "soundconfig.h"
|
|
|
|
typedef struct {
|
|
int len; // The number of samples in each channel.
|
|
float *L; // The left channel.
|
|
float *R; // The right channel.
|
|
} 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
|