Skip to content

Commit

Permalink
Track: Remove CuePosition class and corresponding methods
Browse files Browse the repository at this point in the history
  • Loading branch information
Holzhaus committed Jul 6, 2021
1 parent bfe6f6f commit ff1c194
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 55 deletions.
4 changes: 0 additions & 4 deletions src/track/cue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,3 @@ mixxx::audio::FramePos Cue::getEndPosition() const {
QMutexLocker lock(&m_mutex);
return m_endPosition;
}

bool operator==(const CuePosition& lhs, const CuePosition& rhs) {
return lhs.getPosition() == rhs.getPosition();
}
39 changes: 0 additions & 39 deletions src/track/cue.h
Original file line number Diff line number Diff line change
Expand Up @@ -155,42 +155,3 @@ class CuePointer : public std::shared_ptr<Cue> {
private:
static void deleteLater(Cue* pCue);
};

class CuePosition {
public:
CuePosition()
: m_position(0.0) {
}
CuePosition(double position)
: m_position(position) {
}

double getPosition() const {
return m_position;
}

void setPosition(double position) {
m_position = position;
}

void set(double position) {
m_position = position;
}

void reset() {
m_position = 0.0;
}

private:
double m_position;
};

bool operator==(const CuePosition& lhs, const CuePosition& rhs);

inline bool operator!=(const CuePosition& lhs, const CuePosition& rhs) {
return !(lhs == rhs);
}

inline QDebug operator<<(QDebug dbg, const CuePosition& arg) {
return dbg << "position =" << arg.getPosition();
}
12 changes: 0 additions & 12 deletions src/track/track.h
Original file line number Diff line number Diff line change
Expand Up @@ -264,20 +264,8 @@ class Track : public QObject {

/// Get the track's main cue point
mixxx::audio::FramePos getMainCuePosition() const;
CuePosition getCuePoint() const {
const auto position = getMainCuePosition();
if (!position.isValid()) {
return {};
}
return {position.toEngineSamplePos()};
};
// Set the track's main cue point
void setMainCuePosition(mixxx::audio::FramePos position);
void setCuePoint(CuePosition position) {
setMainCuePosition(
mixxx::audio::FramePos::fromEngineSamplePosMaybeInvalid(
position.getPosition()));
}
/// Shift all cues by a constant offset
void shiftCuePositionsMillis(mixxx::audio::FrameDiff_t milliseconds);
// Call when analysis is done.
Expand Down

0 comments on commit ff1c194

Please sign in to comment.