diff options
author | Daniel Schürmann <daschuer@mixxx.org> | 2021-03-11 10:24:40 +0100 |
---|---|---|
committer | Daniel Schürmann <daschuer@mixxx.org> | 2021-03-11 14:18:45 +0100 |
commit | 4f473a8c2a163d4e00b0bc9db5843fe468df6ded (patch) | |
tree | 3cb7f4d3941c606cfd30f49de510380e2b78cdb7 /src/track/track.cpp | |
parent | 8869f2ae8379b8a08f79baed9550f1c32748519e (diff) |
Add wapper trySetAndLockBeats() to stream line the track API
Diffstat (limited to 'src/track/track.cpp')
-rw-r--r-- | src/track/track.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/track/track.cpp b/src/track/track.cpp index c76f8edfe5..070ca47f5f 100644 --- a/src/track/track.cpp +++ b/src/track/track.cpp @@ -302,9 +302,14 @@ QString Track::getBpmText() const { return QString("%1").arg(getBpm(), 3,'f',1); } -bool Track::trySetBeats(mixxx::BeatsPointer pBeats, bool lockBpmAfterSet) { +bool Track::trySetBeats(mixxx::BeatsPointer pBeats) { QMutexLocker lock(&m_qMutex); - return trySetBeatsMarkDirtyAndUnlock(&lock, pBeats, lockBpmAfterSet); + return trySetBeatsMarkDirtyAndUnlock(&lock, pBeats, false); +} + +bool Track::trySetAndLockBeats(mixxx::BeatsPointer pBeats) { + QMutexLocker lock(&m_qMutex); + return trySetBeatsMarkDirtyAndUnlock(&lock, pBeats, true); } bool Track::setBeatsWhileLocked(mixxx::BeatsPointer pBeats) { |