10 #ifndef hifi_Recording_Deck_h
11 #define hifi_Recording_Deck_h
17 #include <QtCore/QObject>
18 #include <QtCore/QTimer>
19 #include <QtCore/QList>
21 #include <DependencyManager.h>
29 class Deck :
public QObject,
public ::Dependency {
32 using ClipList = std::list<ClipPointer>;
33 using Pointer = std::shared_ptr<Deck>;
35 Deck(QObject* parent =
nullptr);
38 void queueClip(ClipPointer clip,
float timeOffset = 0.0f);
39 void removeClip(
const ClipConstPointer& clip);
40 void removeClip(
const QString& clipName);
41 void removeAllClips();
42 ClipList getClips(
const QString& clipName)
const;
48 bool isPaused()
const;
54 void loop(
bool enable =
true);
55 bool isLooping()
const;
57 float position()
const;
58 void seek(
float position);
60 float getVolume()
const {
return _volume; }
61 void setVolume(
float volume);
64 void playbackStateChanged();
68 using Mutex = std::recursive_mutex;
69 using Locker = std::unique_lock<Mutex>;
71 ClipPointer getNextClip();
77 quint64 _startEpoch { 0 };
78 Frame::Time _position { 0 };
82 float _volume { 1.0f };