Skip to content

Commit d425917

Browse files
committed
VS1053 input example 1 channel
1 parent 8ab3de1 commit d425917

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

examples/examples-vs1053/streams-vs1053-serial/streams-vs1053-serial.ino

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@
1111
#include "AudioTools.h"
1212
#include "AudioLibs/VS1053Stream.h"
1313

14+
int channels = 1;
1415
VS1053Stream in; // Access VS1053/VS1003 as stream
15-
CsvStream<int16_t> csvStream(Serial);
16+
CsvStream<int16_t> csvStream(Serial, channels);
1617
StreamCopy copier(csvStream, in); // copy in to csvStream
1718

1819
// Arduino Setup
@@ -22,7 +23,7 @@ void setup(void) {
2223

2324
auto cfg = in.defaultConfig(RX_MODE);
2425
cfg.sample_rate = 16000;
25-
cfg.channels = 1;
26+
cfg.channels = channels;
2627
cfg.input_device = VS1053_MIC; // or VS1053_AUX
2728
in.begin(cfg);
2829

0 commit comments

Comments
 (0)