File tree Expand file tree Collapse file tree 3 files changed +4
-10
lines changed Expand file tree Collapse file tree 3 files changed +4
-10
lines changed Original file line number Diff line number Diff line change 1
1
/* *
2
- * @file streams-generator-dac .ino
2
+ * @file streams-generator-analog .ino
3
3
* @author Phil Schatzmann
4
- * @brief see https://github.com/pschatzmann/arduino-audio-tools/blob/main/examples/examples-stream/streams-generator-dac /README.md
4
+ * @brief see https://github.com/pschatzmann/arduino-audio-tools/blob/main/examples/examples-stream/streams-generator-analog /README.md
5
5
* @author Phil Schatzmann
6
6
* @copyright GPLv3
7
7
**/
8
8
9
9
#include " AudioTools.h"
10
10
11
-
12
-
13
11
typedef int16_t sound_t ; // sound will be represented as int16_t (with 2 bytes)
14
12
uint16_t sample_rate=44100 ;
15
13
uint8_t channels = 2 ; // The stream will have 2 channels
@@ -24,8 +22,7 @@ void setup(void) {
24
22
Serial.begin (115200 );
25
23
AudioLogger::instance ().begin (Serial, AudioLogger::Info);
26
24
27
-
28
- // start the bluetooth
25
+ // start the analog output
29
26
AnalogConfig config = out.defaultConfig (TX_MODE);
30
27
config.sample_rate = sample_rate;
31
28
out.begin (config);
Original file line number Diff line number Diff line change 8
8
9
9
#include " AudioTools.h"
10
10
11
-
12
-
13
11
// int pins[] = {22, 23};
14
12
int channels = 1 ;
15
13
uint16_t sample_rate=22000 ;
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ class PWMAudioStreamESP32 : public PWMAudioStreamBase {
41
41
42
42
// Ends the output
43
43
virtual void end (){
44
- LOGD (LOG_METHOD);
44
+ LOGD (LOG_METHOD);
45
45
timerAlarmDisable (timer);
46
46
for (int j=0 ;j<audio_config.channels ;j++){
47
47
ledcDetachPin (pins[j].gpio );
@@ -99,7 +99,6 @@ class PWMAudioStreamESP32 : public PWMAudioStreamBase {
99
99
}
100
100
}
101
101
102
-
103
102
// / Setup ESP32 timer with callback
104
103
virtual void setupTimer () {
105
104
LOGD (LOG_METHOD);
You can’t perform that action at this time.
0 commit comments