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.
This commit is contained in:
1 parent
4c8cc0a591
commit
955b1d29b2
3 files changed
+43
-3
No files matched your search
@@ -0,0 +1,24 @@
|
||||
#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;
|
||||
}
|
||||
Reference in new issue
Block a user