code clean

This commit is contained in:
Patrick Haßel 2025-06-06 14:42:42 +02:00
parent 97c52fe8f3
commit a8837a4598

View File

@ -36,7 +36,7 @@ MP3DecoderHelix mp3Decoder;
EncodedAudioStream mp3Stream(&board, &mp3Decoder); EncodedAudioStream mp3Stream(&board, &mp3Decoder);
StreamCopy copier; StreamCopy mp3Copier;
bool running = false; bool running = false;
@ -46,7 +46,7 @@ void audioStop() {
Serial.println("[AUDIO ] STOP"); Serial.println("[AUDIO ] STOP");
} }
copyErrors = 0; copyErrors = 0;
copier.end(); mp3Copier.end();
mp3Stream.end(); mp3Stream.end();
mp3Decoder.end(); mp3Decoder.end();
opusDecoder.end(); opusDecoder.end();
@ -93,9 +93,9 @@ bool audioBeginMP3Stream(const Entry &entry, Stream &source) {
return false; return false;
} }
copier.begin(mp3Stream, source); mp3Copier.begin(mp3Stream, source);
if (copier.copy() == 0) { if (mp3Copier.copy() == 0) {
Serial.printf("[AUDIO ] [%s] Failed to copy initial data.", entry.type.c_str()); Serial.printf("[AUDIO ] [%s] Failed to copy initial data.", entry.type.c_str());
audioStop(); audioStop();
return false; return false;
@ -212,7 +212,7 @@ bool audioLoop() {
board.setMute(audioMute); board.setMute(audioMute);
stateBufferUpdateRequest(); stateBufferUpdateRequest();
} }
if (copier.copy() > 0) { if (mp3Copier.copy() > 0) {
copyErrors = 0; copyErrors = 0;
return true; return true;
} }