Skip to content

Commit 609389b

Browse files
committed
cleanup
1 parent 69d4860 commit 609389b

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed

examples/examples-stream/streams-memory_raw-i2s/streams-memory_raw-i2s.ino

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,17 @@
1111
#include "AudioTools.h"
1212
#include "StarWars30.h"
1313

14-
15-
16-
uint8_t channels = 1;
17-
uint16_t sample_rate = 22050;
18-
14+
AudioInfo info(22050, 1, 16);
1915
I2SStream i2s; // Output to I2S
2016
MemoryStream music(StarWars30_raw, StarWars30_raw_len);
21-
StreamCopyT<int16_t> copier(i2s, music); // copies sound into i2s
22-
17+
StreamCopy copier(i2s, music); // copies sound into i2s
2318

2419
void setup(){
2520
Serial.begin(115200);
2621
AudioLogger::instance().begin(Serial, AudioLogger::Info);
2722

2823
auto config = i2s.defaultConfig(TX_MODE);
29-
config.sample_rate = sample_rate;
30-
config.channels = channels;
31-
config.bits_per_sample = 16;
24+
config.copyFrom(info);
3225
i2s.begin(config);
3326

3427
}

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=audio-tools
2-
version=0.9.3
2+
version=0.9.5
33
author=Phil Schatzmann
44
maintainer=Phil Schatzmann <[email protected]>
55
sentence=Some useful audio processing classes

0 commit comments

Comments
 (0)