Skip to content

Commit bef3bee

Browse files
Fixed ogg and flac not playing with an offset (#90)
Still have to play part of the start to get the decoder locked
1 parent 03d7175 commit bef3bee

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/ESP32_VS1053_Stream.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -324,10 +324,11 @@ bool ESP32_VS1053_Stream::connectToHost(const char *url, const char *username,
324324
if (strcmp(_url, url))
325325
{
326326
_vs1053->stopSong();
327-
snprintf(_url, VS1053_MAX_URL_LENGTH, "%s", url);
327+
snprintf(_url, sizeof(_url), "%s", url);
328+
_vs1053->startSong();
328329
}
329330
_streamStallStartMS = 0;
330-
log_i("redirected %i times to %s", _redirectCount, url);
331+
log_d("redirected %i times to %s", _redirectCount, url);
331332
_redirectCount = 0;
332333
return true;
333334
}
@@ -703,7 +704,6 @@ void ESP32_VS1053_Stream::stopSong()
703704
if (!_http && !_playingFile)
704705
return;
705706

706-
_vs1053->stopSong();
707707
_remainingBytes = 0;
708708
_offset = 0;
709709
_bitrate = 0;

0 commit comments

Comments
 (0)