@@ -20,18 +20,20 @@ namespace audio_tools {
20
20
21
21
/* *
22
22
* @brief AnalogAudioStream: A very fast DAC using DMA using the new
23
- * dac_continuous API
23
+ * dac_continuous API. This implementation assumes that the issue with
24
+ * the different number of samples per channel has been resolved!
25
+ * https://github.com/espressif/esp-idf/issues/12337
24
26
* @ingroup platform
25
27
* @author Phil Schatzmann
26
28
* @copyright GPLv3
27
29
*/
28
- class AnalogDriverESP32V1 : public AnalogDriverBase {
30
+ class AnalogDriverESP32V2 : public AnalogDriverBase {
29
31
public:
30
32
// / Default constructor
31
- AnalogDriverESP32V1 () = default ;
33
+ AnalogDriverESP32V2 () = default ;
32
34
33
35
// / Destructor
34
- virtual ~AnalogDriverESP32V1 () {
36
+ virtual ~AnalogDriverESP32V2 () {
35
37
end ();
36
38
}
37
39
@@ -123,7 +125,7 @@ class AnalogDriverESP32V1 : public AnalogDriverBase {
123
125
// ----------------------------------------------------------
124
126
class IO16Bit : public AudioStream {
125
127
public:
126
- IO16Bit (AnalogDriverESP32V1 *driver) { self = driver; }
128
+ IO16Bit (AnalogDriverESP32V2 *driver) { self = driver; }
127
129
128
130
// / Write int16_t data to the Digital to Analog Converter
129
131
size_t write (const uint8_t *src, size_t size_bytes) override {
@@ -227,7 +229,7 @@ class AnalogDriverESP32V1 : public AnalogDriverBase {
227
229
}
228
230
229
231
protected:
230
- AnalogDriverESP32V1 *self = nullptr ;
232
+ AnalogDriverESP32V2 *self = nullptr ;
231
233
Vector<uint8_t > result_data{0 };
232
234
Vector<int > sampleIndex{0 };
233
235
@@ -612,7 +614,7 @@ class AnalogDriverESP32V1 : public AnalogDriverBase {
612
614
};
613
615
614
616
// / @brief AnalogAudioStream
615
- using AnalogDriver = AnalogDriverESP32V1 ;
617
+ using AnalogDriver = AnalogDriverESP32V2 ;
616
618
617
619
} // namespace audio_tools
618
620
0 commit comments