Skip to content

Commit 0df71d1

Browse files
Maciugabaldram
authored andcommitted
Changed buffer size of the webradio example to 64 (#45) #44
Set the buffer to "64" instead of "32". At 32 and 128 the sound was brassy.
1 parent c8dd35a commit 0df71d1

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

examples/WebRadioDemo/WebRadioDemo.ino

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ const char *host = "comet.shoutca.st";
8282
const char *path = "/1";
8383
int httpPort = 8563;
8484

85-
uint8_t mp3buff[32];
85+
// The buffer size 64 seems to be optimal. At 32 and 128 the sound might be brassy.
86+
uint8_t mp3buff[64];
8687

8788
void setup () {
8889
Serial.begin(115200);
@@ -139,7 +140,8 @@ void loop() {
139140
}
140141

141142
if(client.available() > 0){
142-
uint8_t bytesread = client.read(mp3buff, 32);
143+
// The buffer size 64 seems to be optimal. At 32 and 128 the sound might be brassy.
144+
uint8_t bytesread = client.read(mp3buff, 64);
143145
player.playChunk(mp3buff, bytesread);
144146
}
145147
}

0 commit comments

Comments
 (0)