Skip to content

Commit 3348035

Browse files
committed
tests - timer, wifi performance
1 parent b4f6339 commit 3348035

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#include "AudioTools.h"
2+
3+
URLStream url("SSID","PASSWORD"); // or replace with ICYStream to get metadata
4+
MeasuringStream out(50, &Serial); // final output of decoded stream
5+
StreamCopy copier(out, url); // copy url to decoder
6+
7+
void setup(){
8+
Serial.begin(115200);
9+
AudioLogger::instance().begin(Serial, AudioLogger::Warning);
10+
while(!Serial);
11+
12+
url.begin("http://stream.srg-ssr.ch/m/rsj/mp3_128","audio/mp3");
13+
}
14+
15+
void loop(){
16+
copier.copy();
17+
}

examples/tests/timer/test-timer/test-timer.ino

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ void loop() {
2121
timer.begin(callback, delay_us, US);
2222
delay(10000);
2323
timer.end();
24-
Serial.print("Sampling Rate 44100 vs eff: ");
25-
Serial.println(count / 10);
24+
char msg[80];
25+
sprintf(msg, "Sampling Rate %d vs eff: %d", sampling_rate, count / 10);
26+
Serial.println(msg);
2627
}

0 commit comments

Comments
 (0)