Refactor I2S to be cleaner, more extensible

With the multiple I2S modes on the ESP32, it makes sense to use a
cleaner class hierarchy for the I2S tools.  Make I2SNoDAC into a
subclass of I2S (renamed from I2SDAC) and remove about 80% of the
code which was identical exept for the per-sample bitstream synthesis.
This commit is contained in:
Earle F. Philhower, III committed 2018-01-25 19:15:02 -08:00
1 parent 7a7f8bf449
commit 96fc37dce5
12 files changed
+113 -175

No files matched your search

@@ -1,12 +1,12 @@
#include <Arduino.h>
#include "AudioGeneratorAAC.h"
#include "AudioOutputI2SDAC.h"
#include "AudioOutputI2S.h"
#include "AudioFileSourcePROGMEM.h"
#include "sampleaac.h"
AudioFileSourcePROGMEM *in;
AudioGeneratorAAC *aac;
AudioOutputI2SDAC *out;
AudioOutputI2S *out;
void setup()
{
@@ -14,7 +14,7 @@ void setup()
in = new AudioFileSourcePROGMEM(sampleaac, sizeof(sampleaac));
aac = new AudioGeneratorAAC();
out = new AudioOutputI2SDAC();
out = new AudioOutputI2S();
aac->begin(in, out);
}