Files
ESP8266Audio/tests/host/wav.cpp
T
Earle F. Philhower, III 955b1d29b2 Fix WAV header decode, add WAV host test
Fixes #114

Adobe Audition WAV files have a slightly different but legal header
format.  Enable that format (only for PCM, not a/ulaw or anything else)
to be decoedd properly.

Add in a WAV object test that can run on hosts and valgrind.
2018-08-03 12:02:52 -07:00

25 lines
547 B
C++

#include <Arduino.h>
#include "AudioFileSourceSTDIO.h"
#include "AudioOutputSTDIO.h"
#include "AudioGeneratorWAV.h"
int main(int argc, char **argv)
{
(void) argc;
(void) argv;
AudioFileSourceSTDIO *in = new AudioFileSourceSTDIO("test_8u_16.wav");
AudioOutputSTDIO *out = new AudioOutputSTDIO();
out->SetFilename("pcm.wav");
AudioGeneratorWAV *wav = new AudioGeneratorWAV();
wav->begin(in, out);
while (wav->loop()) { /*noop*/ }
wav->stop();
out->stop();
delete wav;
delete out;
delete in;
}