|
|
@ -97,13 +97,6 @@ void MP3::mp3_decoder_task(void *pvParameters) { |
|
|
|
} |
|
|
|
decoder = new AudioGeneratorMP3(preallocateCodec, preallocateCodecSize); |
|
|
|
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); |
|
|
|
if (volume > 0 && volume <= 100) { |
|
|
|
out->SetGain(((float)volume)/100.0); |
|
|
|