This repository has been archived on 2017-07-22. You can view files and clone it, but cannot push or open issues/pull-requests.
jlsampler/fsample.h

23 lines
533 B
C

#ifndef fsample_HEADER_
#define fsample_HEADER_
#include "soundconfig.h"
// A floating point sample.
typedef struct {
int len; // The number of samples in each channel.
float *L; // The left channel.
float *R; // The right channel.
} FSample;
// Load a sample. Allocates.
void fsample_load(FSample *s, char *path, SoundConfig *conf, int buf_size);
void fsample_set_data(FSample *s, float *L, float *R, int len);
double fsample_max_amp(FSample *s);
// Free a sample.
void fsample_free(FSample *s);
#endif