Skip to content

Commit

Permalink
Rework player logic, fixes looping
Browse files Browse the repository at this point in the history
  • Loading branch information
drfiemost committed Jul 18, 2024
1 parent c9effa2 commit d42f5fe
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1009,7 +1009,11 @@ uint_least32_t ConsolePlayer::getBufSize()
else if ((m_timer.stop != 0) && (m_timer.current >= m_timer.stop))
{
m_state = playerExit;
for (;;)
if (m_track.loop)
{
m_state = playerRestart;
}
else
{
if (m_track.single)
return 0;
Expand All @@ -1020,10 +1024,7 @@ uint_least32_t ConsolePlayer::getBufSize()
if (m_track.selected == m_track.first)
return 0;
m_state = playerRestart;
break;
}
if (m_track.loop)
m_state = playerRestart;
}
else
{
Expand Down

0 comments on commit d42f5fe

Please sign in to comment.