Skip to content

Commit

Permalink
Forcibly reset the track position if music playback is started from t…
Browse files Browse the repository at this point in the history
…he beginning
  • Loading branch information
oleg-derevenetz committed Jan 3, 2025
1 parent 1b03f36 commit ed1f299
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/engine/audio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,8 @@ namespace
// Either there is no need to resume music playback, or the resumption failed. Let's try to
// start the playback from the beginning.
if ( returnCode != 0 ) {
track->setPosition( 0 );

returnCode = Mix_FadeInMusic( mus.get(), loopCount, musicFadeInMs );

if ( returnCode != 0 ) {
Expand Down

0 comments on commit ed1f299

Please sign in to comment.