Browse Source

dont prefill buffer

main
Hendrik Langer 7 years ago
parent
commit
d9b33cb144
  1. 7
      src/mp3.cpp

7
src/mp3.cpp

@ -97,13 +97,6 @@ void MP3::mp3_decoder_task(void *pvParameters) {
} }
decoder = new AudioGeneratorMP3(preallocateCodec, preallocateCodecSize); decoder = new AudioGeneratorMP3(preallocateCodec, preallocateCodecSize);
decoder->RegisterStatusCB(StatusCallback, (void*)"mp3"); decoder->RegisterStatusCB(StatusCallback, (void*)"mp3");
Serial.println("prefilling buffer");
for (int i=0; i<10; i++) {
// char c;
// buff->read(&c, 1);
buff->loop(); delay(100); // pre-fill buffer
}
Serial.println("prefilling buffer done");
decoder->begin(buff, out); decoder->begin(buff, out);
if (volume > 0 && volume <= 100) { if (volume > 0 && volume <= 100) {
out->SetGain(((float)volume)/100.0); out->SetGain(((float)volume)/100.0);

Loading…
Cancel
Save