diff options
-rw-r--r-- | src/load/load-wav.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/load/load-wav.c b/src/load/load-wav.c new file mode 100644 index 0000000..4d94b9c --- /dev/null +++ b/src/load/load-wav.c @@ -0,0 +1,20 @@ +#include <stdio.h> +#include <wav.h> +#include "load.h" +#include <mossrose.h> + +struct mossrose_sound_t * load_wav(const char *filename) +{ + WavFile *audio = wav_open(filename, "r"); + if (audio == NULL) { + fprintf(stderr, "Couldn't open wav file.\n"); + return NULL; + } + + printf("N of Channels: %d\nSample Rate: %d\nSample Size: %d\n" + "Length: %d\n" + "Sub format: %d\n", wav_get_num_channels(audio), wav_get_sample_rate(audio), + wav_get_sample_size(audio), wav_get_length(audio), wav_get_sub_format(audio)); + wav_close(audio); + return NULL; +} |