Skip to content

Commit 1bbc4e7

Browse files
committed
AudioPlayer is skipping first song
1 parent 7c5b857 commit 1bbc4e7

File tree

1 file changed

+1
-27
lines changed

1 file changed

+1
-27
lines changed

src/AudioTools/AudioPlayer.h

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -464,33 +464,7 @@ namespace audio_tools {
464464
}
465465

466466
/// (Re)Starts the playing of the music (from the beginning)
467-
virtual bool begin(bool isActive = true) {
468-
LOGD(LOG_METHOD);
469-
bool result = false;
470-
471-
// start dependent objects
472-
p_out_decoding->begin();
473-
p_source->begin();
474-
meta_out.begin();
475-
476-
p_input_stream = p_source->nextStream(1);
477-
if (p_input_stream != nullptr) {
478-
if (meta_active) {
479-
copier.setCallbackOnWrite(decodeMetaData, this);
480-
}
481-
copier.begin(*p_out_decoding, *p_input_stream);
482-
timeout = millis() + p_source->timeoutMs();
483-
active = isActive;
484-
result = true;
485-
}
486-
else {
487-
LOGW("-> begin: no data found");
488-
}
489-
return result;
490-
}
491-
492-
/// (Re)Starts the playing of the music (from the beginning)
493-
virtual bool begin(int index, bool isActive = true) {
467+
virtual bool begin(int index=0, bool isActive = true) {
494468
LOGD(LOG_METHOD);
495469
bool result = false;
496470

0 commit comments

Comments
 (0)