Skip to content

Commit

Permalink
minor code changes
Browse files Browse the repository at this point in the history
  • Loading branch information
BaraMGB committed Jan 5, 2017
1 parent b04f8b8 commit daf14a4
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/core/Song.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ void Song::processNextBuffer()
( tl->loopBegin().getTicks() * 60 * 1000 / 48 ) / getTempo();
m_playPos[m_playMode].setTicks(
tl->loopBegin().getTicks() );
emit updateSampleTracks();
}
}

Expand Down Expand Up @@ -338,18 +339,18 @@ void Song::processNextBuffer()
// if looping-mode is enabled and we have got
// past the looping range, return to the
// beginning of the range
if( m_playPos[m_playMode] == tl->loopEnd() - 1 )
{
emit updateSampleTracks();
}
if( m_playPos[m_playMode] >= tl->loopEnd() )
{
m_playPos[m_playMode].setTicks( tl->loopBegin().getTicks() );

m_elapsedMilliSeconds =
( ( tl->loopBegin().getTicks() ) * 60 * 1000 / 48 ) /
m_elapsedMilliSeconds =
( ( tl->loopBegin().getTicks() ) * 60 * 1000 / 48 ) /
getTempo();
}
else if( m_playPos[m_playMode] == tl->loopEnd() - 1 )
{
emit updateSampleTracks();
}
}
else
{
Expand Down

0 comments on commit daf14a4

Please sign in to comment.