wavin

Files: wavin.h, wavin.c

Reads a mono WAV file.
This module reads a mono WAV file from disk. It uses the public-domain dr_wav library for decoding, so it can be a good substitute for libsndfile.

Functions

sp_wavin_create(sp_wavin **wavin)
sp_wavin_init(sp_data *sp, sp_wavin *wavin, const char *filename)
sp_wavin_compute(sp_data *sp, sp_wavin *wavin, SPFLOAT *out)
sp_wavin_destroy(sp_wavin **wavin)

Mandatory Parameters

filename: Filename
(Recommended value: N/A)

Outputs

out: output signal.

Other Functions:

sp_wavin_get_sample(sp_data *sp, sp_wavin *wavin, SPFLOAT pos)
Get a particular sample from the file.
pos: Sample position
(Suggested default: 0)
sp_wavin_seek(sp_data *sp, sp_wavin *wavin, unsigned long sample)
Seeks to position in file.
sample: Sample position
(Suggested default: 0)