forked from mixxxdj/mixxx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbasetrackplayer.h
103 lines (86 loc) · 3.17 KB
/
basetrackplayer.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
#ifndef BASETRACKPLAYER_H
#define BASETRACKPLAYER_H
#include "configobject.h"
#include "trackinfoobject.h"
#include "baseplayer.h"
#include "engine/enginechannel.h"
#include "engine/enginedeck.h"
class EngineMaster;
class ControlObject;
class ControlPotmeter;
class ControlObjectThread;
class ControlObjectSlave;
class AnalyserQueue;
class EffectsManager;
// Interface for not leaking implementation details of BaseTrackPlayer into the
// rest of Mixxx. Also makes testing a lot easier.
class BaseTrackPlayer : public BasePlayer {
Q_OBJECT
public:
// The ordering here corresponds to the ordering of the preferences combo box.
enum TrackLoadReset {
RESET_NONE,
RESET_PITCH,
RESET_PITCH_AND_SPEED,
};
BaseTrackPlayer(QObject* pParent, const QString& group);
virtual ~BaseTrackPlayer() {}
virtual TrackPointer getLoadedTrack() const = 0;
public slots:
virtual void slotLoadTrack(TrackPointer pTrack, bool bPlay=false) = 0;
signals:
void loadTrack(TrackPointer pTrack, bool bPlay=false);
void loadTrackFailed(TrackPointer pTrack);
void newTrackLoaded(TrackPointer pLoadedTrack);
void unloadingTrack(TrackPointer pAboutToBeUnloaded);
};
class BaseTrackPlayerImpl : public BaseTrackPlayer {
Q_OBJECT
public:
BaseTrackPlayerImpl(QObject* pParent,
ConfigObject<ConfigValue>* pConfig,
EngineMaster* pMixingEngine,
EffectsManager* pEffectsManager,
EngineChannel::ChannelOrientation defaultOrientation,
QString group,
bool defaultMaster,
bool defaultHeadphones);
virtual ~BaseTrackPlayerImpl();
TrackPointer getLoadedTrack() const;
// TODO(XXX): Only exposed to let the passthrough AudioInput get
// connected. Delete me when EngineMaster supports AudioInput assigning.
EngineDeck* getEngineDeck() const;
void setupEqControls();
public slots:
void slotLoadTrack(TrackPointer track, bool bPlay=false);
void slotFinishLoading(TrackPointer pTrackInfoObject);
void slotLoadFailed(TrackPointer pTrackInfoObject, QString reason);
void slotUnloadTrack(TrackPointer track);
void slotSetReplayGain(double replayGain);
void slotPlayToggled(double);
private:
ConfigObject<ConfigValue>* m_pConfig;
TrackPointer m_pLoadedTrack;
// Waveform display related controls
ControlPotmeter* m_pWaveformZoom;
ControlObject* m_pEndOfTrack;
ControlObjectThread* m_pLoopInPoint;
ControlObjectThread* m_pLoopOutPoint;
ControlObject* m_pDuration;
ControlObjectThread* m_pBPM;
ControlObjectThread* m_pKey;
ControlObjectThread* m_pReplayGain;
ControlObjectThread* m_pPlay;
ControlObjectSlave* m_pLowFilter;
ControlObjectSlave* m_pMidFilter;
ControlObjectSlave* m_pHighFilter;
ControlObjectSlave* m_pLowFilterKill;
ControlObjectSlave* m_pMidFilterKill;
ControlObjectSlave* m_pHighFilterKill;
ControlObjectSlave* m_pPreGain;
ControlObjectSlave* m_pSpeed;
ControlObjectSlave* m_pPitchAdjust;
EngineDeck* m_pChannel;
bool m_replaygainPending;
};
#endif // BASETRACKPLAYER_H