Functions

src/io_wav.c File Reference

#include "io_wav.h"
#include <stdlib.h>

Go to the source code of this file.

Functions

void wavfile_free (WavFile *w)
 free WavFile struct and data.
void wavfile_print (FILE *out, WavFile *w)
 list content of WavFile struct.
WavFilewavfile_read (FILE *f)
 read WAV-File.
int wavfile_write (WavFile *w, const char *fname)
 write WAV-File.

Function Documentation

void wavfile_free ( WavFile w  ) 

free WavFile struct and data.

Parameters:
w the WavFile struct

Definition at line 45 of file io_wav.c.

void wavfile_print ( FILE *  out,
WavFile w 
)

list content of WavFile struct.

Parameters:
out the output stream (e.g. stderr)
w the wavfile struct

Definition at line 28 of file io_wav.c.

WavFile* wavfile_read ( FILE *  f  ) 

read WAV-File.

see https://ccrma.stanford.edu/courses/422/projects/WaveFormat/ for details on the wav-file format

Parameters:
f a FILE pointer
Returns:
the wavfile (freshly allocated) or NULL (failure)

Definition at line 63 of file io_wav.c.

int wavfile_write ( WavFile w,
const char *  fname 
)

write WAV-File.

see https://ccrma.stanford.edu/courses/422/projects/WaveFormat/ for details on the wav-file format

Parameters:
w the wavfile
fname the name of the output file
Returns:
0 success, else failure

Definition at line 117 of file io_wav.c.