diff options
author | Jan Holthuis <jan.holthuis@ruhr-uni-bochum.de> | 2020-03-02 10:22:57 +0100 |
---|---|---|
committer | Jan Holthuis <jan.holthuis@ruhr-uni-bochum.de> | 2020-03-02 10:22:57 +0100 |
commit | fa6dba8f86420a6eb9979b51f8c10629b4b72466 (patch) | |
tree | 0bec26b36e5f9624f4c4dee5b6e5b1ad165261b1 /src/track/cue.h | |
parent | 8d3672390c77b1199171517422149f623ab00d6a (diff) | |
parent | 18a134faba514f60a273a9b0aa2f3c9a6a09f214 (diff) |
Merge branch 'master' of github.com:mixxxdj/mixxx into hotcue-rgb-colors
Diffstat (limited to 'src/track/cue.h')
-rw-r--r-- | src/track/cue.h | 29 |
1 files changed, 11 insertions, 18 deletions
diff --git a/src/track/cue.h b/src/track/cue.h index 34631127fa..71e1387e03 100644 --- a/src/track/cue.h +++ b/src/track/cue.h @@ -5,7 +5,9 @@ #include <QMutex> #include <QObject> +#include "track/cueinfo.h" #include "track/trackid.h" +#include "util/audiosignal.h" #include "util/color/rgbcolor.h" #include "util/memory.h" @@ -17,21 +19,8 @@ class Cue : public QObject { Q_OBJECT public: - enum class Type { - Invalid = 0, - HotCue = 1, - MainCue = 2, - Beat = 3, // unused (what is this for?) - Loop = 4, - Jump = 5, - Intro = 6, - Outro = 7, - AudibleSound = 8, // range that covers beginning and end of audible sound; - // not shown to user - }; - static constexpr double kNoPosition = -1.0; - static const int kNoHotCue = -1; + static constexpr int kNoHotCue = -1; ~Cue() override = default; @@ -39,8 +28,8 @@ class Cue : public QObject { int getId() const; TrackId getTrackId() const; - Cue::Type getType() const; - void setType(Cue::Type type); + mixxx::CueType getType() const; + void setType(mixxx::CueType type); double getPosition() const; void setStartPosition(double samplePosition); @@ -64,9 +53,13 @@ class Cue : public QObject { private: explicit Cue(TrackId trackId); + explicit Cue( + TrackId trackId, + mixxx::AudioSignal::SampleRate sampleRate, + const mixxx::CueInfo& cueInfo); Cue(int id, TrackId trackId, - Cue::Type type, + mixxx::CueType type, double position, double length, int hotCue, @@ -81,7 +74,7 @@ class Cue : public QObject { bool m_bDirty; int m_iId; TrackId m_trackId; - Cue::Type m_type; + mixxx::CueType m_type; double m_sampleStartPosition; double m_sampleEndPosition; int m_iHotCue; |