arduino-audio-tools
AnalogDriverBase.h
1 #pragma once
2 #include "AudioConfig.h"
3 #if defined(USE_ANALOG)
4 #if defined(ESP32)
5 # include "AnalogConfigESP32.h"
6 # include "AnalogConfigESP32V1.h"
7 #else
8 # include "AnalogConfigStd.h"
9 #endif
10 
11 namespace audio_tools {
12 
14 public:
15  virtual bool begin(AnalogConfig cfg) = 0;
16  virtual void end() = 0;
17  virtual size_t write(const uint8_t *src, size_t size_bytes) { return 0;}
18  virtual size_t readBytes(uint8_t *dest, size_t size_bytes) = 0;
19  virtual int available() = 0;
20  virtual int availableForWrite() { return DEFAULT_BUFFER_SIZE; }
21 };
22 
23 } // ns
24 #endif
ESP32 specific configuration for i2s input via adc. The default input pin is GPIO34....
Definition: AnalogConfigESP32.h:21
Definition: AnalogDriverBase.h:13
Generic Implementation of sound input and output for desktop environments using portaudio.
Definition: AudioConfig.h:823