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

+3 -3
View File
@@ -28,7 +28,7 @@
#include "AudioFileSourceBuffer.h"
#include "AudioGeneratorMP3.h"
#include "AudioGeneratorAAC.h"
#include "AudioOutputI2SDAC.h"
#include "AudioOutputI2S.h"
#include <EEPROM.h>
// Custom web server that doesn't need much RAM
@@ -45,7 +45,7 @@ WiFiServer server(80);
AudioGenerator *decoder = NULL;
AudioFileSourceICYStream *file = NULL;
AudioFileSourceBuffer *buff = NULL;
AudioOutputI2SDAC *out = NULL;
AudioOutputI2S *out = NULL;
int volume = 100;
char title[64];
@@ -283,7 +283,7 @@ void setup()
file = NULL;
buff = NULL;
out = new AudioOutputI2SDAC();
out = new AudioOutputI2S();
decoder = NULL;
LoadSettings();