Skip to content

Commit

Permalink
Merge pull request #11334 from daschuer/gh11257
Browse files Browse the repository at this point in the history
Don't process ejected tracks
  • Loading branch information
Swiftb0y authored Mar 8, 2023
2 parents 9df9dcb + 2c50945 commit 96c5b49
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/engine/enginebuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1140,8 +1140,8 @@ void EngineBuffer::process(CSAMPLE* pOutput, const int iBufferSize) {
m_pScaleST->setSampleRate(m_sampleRate);
m_pScaleRB->setSampleRate(m_sampleRate);

bool bTrackLoading = m_iTrackLoading.loadAcquire() != 0;
if (!bTrackLoading && m_pause.tryLock()) {
bool hasStableTrack = m_pTrackLoaded->toBool() && m_iTrackLoading.loadAcquire() == 0;
if (hasStableTrack && m_pause.tryLock()) {
processTrackLocked(pOutput, iBufferSize, m_sampleRate);
// release the pauselock
m_pause.unlock();
Expand Down

0 comments on commit 96c5b49

Please sign in to comment.