Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
8c07938
Removed unused EngineControl::getTrigger() and added some missing ove…
daschuer Oct 31, 2017
1376352
removed EngineControl::getNextTrigger() since it is only implemented …
daschuer Oct 31, 2017
34f4cb9
removed m_bReloopCatchUpcomingLoop, after setting it always true to s…
daschuer Oct 31, 2017
f862b39
move some member variables to initaizer list
daschuer Oct 31, 2017
c4bf90b
Allow rounding issues when exit the loop by seek, attempt to fix bug …
daschuer Nov 1, 2017
42f2b79
rmoved unused m_bLoopManualTogglePressedToExitLoop
daschuer Nov 2, 2017
3b4a6ab
split process function for only one call per callback
daschuer Nov 2, 2017
4c4ae20
disable loop when jumping out of it in reverse direction
daschuer Nov 2, 2017
d7a6e92
Allow scratching in front of an enabled loop
daschuer Nov 4, 2017
d9c6907
Only disable the loop when actually jumping out of one.
daschuer Nov 4, 2017
b064901
Allow to enable a stored loop
daschuer Nov 4, 2017
719314e
fix reloop toggle behind a loop
daschuer Nov 6, 2017
ae5f20a
Fix one test and remove two obolete tests
daschuer Nov 6, 2017
e683839
Don't adjust playposition when moving a catching loop.
daschuer Nov 7, 2017
093e4ea
Disable a Loop when jumping over it using hot-cues
daschuer Nov 7, 2017
21fc021
Move setting loop samples before juming into new loop
daschuer Nov 8, 2017
92028d0
simplified some loopingcontrol functions
daschuer Nov 8, 2017
6ecc23f
store current samples in m_engineLoopSamples to avoid a change in bet…
daschuer Nov 9, 2017
bc0ef84
Calculate the seek and the jump target inside a loop in a single next…
daschuer Nov 11, 2017
f545378
removed unused return value from EngineControl::process()
daschuer Nov 11, 2017
e680975
restore lost loop enbled condition
daschuer Nov 12, 2017
c013ce6
do loops seeks when paused
daschuer Nov 12, 2017
ca48a4c
added LoopingControlTest.LoopEscape
daschuer Nov 12, 2017
091f6ac
fix failing tests
daschuer Nov 12, 2017
3968faa
Add elipsis in currentLoopMatchesBeatloopSize()
daschuer Nov 13, 2017
c5e6f45
Enable double precision for loop positions
daschuer Nov 13, 2017
05e3d49
Fix Beats::findNBeatsFromSample() precision
daschuer Nov 14, 2017
1a74fd6
Avoid escaping loop after manually adjust
daschuer Nov 15, 2017
7cf32d0
Avoid escaping loop after manually adjust, a second way
daschuer Nov 16, 2017
39d67f6
Optimize beat jumpfor non cons beat grids
daschuer Nov 16, 2017
f822cb8
Enable loop wen moving loop in marker in the same way we do for the l…
daschuer Dec 6, 2017
8299de4
Fix typo that causes an infinite loop
daschuer Dec 7, 2017
ab694d0
Get rid of rounding issues by fully moving to double precision looping.
daschuer Dec 8, 2017
d85d3b3
Try to fix test on gcc 7 using EXPECT_NEAR
daschuer Dec 9, 2017
e877dee
Keep the test code maintainable (#24)
uklotzde Dec 10, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions build/depends.py
Original file line number Diff line number Diff line change
Expand Up @@ -1062,6 +1062,7 @@ def sources(self, build):
"track/beatgrid.cpp",
"track/beatmap.cpp",
"track/beatutils.cpp",
"track/beats.cpp",
"track/bpm.cpp",
"track/keyfactory.cpp",
"track/keys.cpp",
Expand Down
11 changes: 0 additions & 11 deletions src/engine/bpmcontrol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -792,17 +792,6 @@ void BpmControl::setCurrentSample(const double dCurrentSample, const double dTot
EngineControl::setCurrentSample(dCurrentSample, dTotalSamples);
}

double BpmControl::process(const double dRate,
const double dCurrentSample,
const double dTotalSamples,
const int iBufferSize) {
Q_UNUSED(dRate);
Q_UNUSED(dCurrentSample);
Q_UNUSED(dTotalSamples);
Q_UNUSED(iBufferSize);
return kNoTrigger;
}

double BpmControl::updateLocalBpm() {
double prev_local_bpm = m_pLocalBpm->get();
double local_bpm = 0;
Expand Down
8 changes: 2 additions & 6 deletions src/engine/bpmcontrol.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class BpmControl : public EngineControl {

public:
BpmControl(QString group, UserSettingsPointer pConfig);
virtual ~BpmControl();
~BpmControl() override;

double getBpm() const;
double getLocalBpm() const { return m_pLocalBpm ? m_pLocalBpm->get() : 0.0; }
Expand All @@ -38,11 +38,7 @@ class BpmControl : public EngineControl {
double getBeatDistance(double dThisPosition) const;
double getPreviousSample() const { return m_dPreviousSample; }

void setCurrentSample(const double dCurrentSample, const double dTotalSamples);
double process(const double dRate,
const double dCurrentSample,
const double dTotalSamples,
const int iBufferSize);
void setCurrentSample(const double dCurrentSample, const double dTotalSamples) override;
void setTargetBeatDistance(double beatDistance);
void setInstantaneousBpm(double instantaneousBpm);
void resetSyncAdjustment();
Expand Down
4 changes: 1 addition & 3 deletions src/engine/clockcontrol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ void ClockControl::slotBeatsUpdated() {
}
}

double ClockControl::process(const double dRate,
void ClockControl::process(const double dRate,
const double currentSample,
const double totalSamples,
const int iBuffersize) {
Expand All @@ -66,6 +66,4 @@ double ClockControl::process(const double dRate,
double distanceToClosestBeat = fabs(currentSample - closestBeat);
m_pCOBeatActive->set(distanceToClosestBeat < blinkIntervalSamples / 2.0);
}

return kNoTrigger;
}
6 changes: 3 additions & 3 deletions src/engine/clockcontrol.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ class ClockControl: public EngineControl {
ClockControl(QString group,
UserSettingsPointer pConfig);

virtual ~ClockControl();
~ClockControl() override;

double process(const double dRate, const double currentSample,
const double totalSamples, const int iBufferSize);
void process(const double dRate, const double currentSample,
const double totalSamples, const int iBufferSize) override;

public slots:
void trackLoaded(TrackPointer pNewTrack, TrackPointer pOldTrack) override;
Expand Down
4 changes: 2 additions & 2 deletions src/engine/cuecontrol.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ class CueControl : public EngineControl {
public:
CueControl(QString group,
UserSettingsPointer pConfig);
virtual ~CueControl();
~CueControl() override;

virtual void hintReader(HintVector* pHintList);
virtual void hintReader(HintVector* pHintList) override;
bool updateIndicatorsAndModifyPlay(bool newPlay, bool playPossible);
void updateIndicators();
bool isTrackAtCue();
Expand Down
25 changes: 1 addition & 24 deletions src/engine/enginecontrol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,37 +19,14 @@ EngineControl::EngineControl(QString group,
EngineControl::~EngineControl() {
}

double EngineControl::process(const double dRate,
void EngineControl::process(const double dRate,
const double dCurrentSample,
const double dTotalSamples,
const int iBufferSize) {
Q_UNUSED(dRate);
Q_UNUSED(dCurrentSample);
Q_UNUSED(dTotalSamples);
Q_UNUSED(iBufferSize);
return kNoTrigger;
}

double EngineControl::nextTrigger(const double dRate,
const double currentSample,
const double totalSamples,
const int iBufferSize) {
Q_UNUSED(dRate);
Q_UNUSED(currentSample);
Q_UNUSED(totalSamples);
Q_UNUSED(iBufferSize);
return kNoTrigger;
}

double EngineControl::getTrigger(const double dRate,
const double currentSample,
const double totalSamples,
const int iBufferSize) {
Q_UNUSED(dRate);
Q_UNUSED(currentSample);
Q_UNUSED(totalSamples);
Q_UNUSED(iBufferSize);
return kNoTrigger;
}

void EngineControl::trackLoaded(TrackPointer pNewTrack, TrackPointer pOldTrack) {
Expand Down
18 changes: 3 additions & 15 deletions src/engine/enginecontrol.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,29 +36,17 @@ class EngineControl : public QObject {
public:
EngineControl(QString group,
UserSettingsPointer pConfig);
virtual ~EngineControl();
~EngineControl() override;

// Called by EngineBuffer::process every latency period. See the above
// comments for information about guarantees that hold during this call. An
// EngineControl can perform any upkeep operations that are necessary during
// this call. If the EngineControl would like to request the playback
// position to be altered, it should return the sample to seek to from this
// method. Otherwise it should return kNoTrigger.
virtual double process(const double dRate,
// this call.
virtual void process(const double dRate,
const double dCurrentSample,
const double dTotalSamples,
const int iBufferSize);

virtual double nextTrigger(const double dRate,
const double dCurrentSample,
const double dTotalSamples,
const int iBufferSize);

virtual double getTrigger(const double dRate,
const double dCurrentSample,
const double dTotalSamples,
const int iBufferSize);

// hintReader allows the EngineControl to provide hints to the reader to
// indicate that the given portion of a song is a potential imminent seek
// target.
Expand Down
2 changes: 1 addition & 1 deletion src/engine/keycontrol.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class KeyControl : public EngineControl {
};

KeyControl(QString group, UserSettingsPointer pConfig);
virtual ~KeyControl();
~KeyControl() override;

// Returns a struct, with the results of the last pitch and tempo calculations
KeyControl::PitchTempoRatio getPitchTempoRatio();
Expand Down
Loading