Skip to content

A minimal header only library for C to load WAV audio files with PCM format or FLOAT format.

License

Notifications You must be signed in to change notification settings

luppichristian/simple_wave

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

This is a very simple library to load and parse WAV files.

This library supports uncompressed PCM Uint8, Sint16, Sint32, Float32, Float64.

extern int Wave_ParseBuffer(void* buff, size_t size, WAVE* out_wave);

extern int Wave_LoadStream(FILE* file, long size, WAVE* out_wave, WAVE_ALLOCATOR* allocator);
extern int Wave_LoadPath(const char* path, WAVE* out_wave, WAVE_ALLOCATOR* allocator);

extern int Wave_LoadStreamOnlyInfo(FILE* file, long size, WAVE* out_wave, WAVE_ALLOCATOR* allocator);
extern int Wave_LoadPathOnlyInfo(const char* path, WAVE* out_wave, WAVE_ALLOCATOR* allocator);

extern WAVE_SAMPLE_FORMAT Wave_GetSampleFormat(WAVE* wave);
extern float Wave_GetLengthInSeconds(WAVE* wave);
extern int Wave_GetSampleFrequency(WAVE* wave);
extern int Wave_GetChannelCount(WAVE* wave);
extern int Wave_GetSampleData(WAVE* wave, void** out_samples, size_t* out_samples_size);
extern int Wave_GetSampleCount(WAVE* wave);
extern int Wave_Free(WAVE* wave, WAVE_ALLOCATOR* allocator);
extern size_t Wave_GetSampleDataOffset(WAVE* wave);

About

A minimal header only library for C to load WAV audio files with PCM format or FLOAT format.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Languages