34 |
// Special QListViewItem::rtti() unique return value. |
// Special QListViewItem::rtti() unique return value. |
35 |
#define QSAMPLER_DEVICE_ITEM 1001 |
#define QSAMPLER_DEVICE_ITEM 1001 |
36 |
|
|
37 |
|
// Early forward declaration. |
38 |
|
class qsamplerDevicePort; |
39 |
|
|
40 |
|
|
41 |
//------------------------------------------------------------------------- |
//------------------------------------------------------------------------- |
42 |
// qsamplerDeviceParam - MIDI/Audio Device parameter structure. |
// qsamplerDeviceParam - MIDI/Audio Device parameter structure. |
70 |
QString value; |
QString value; |
71 |
}; |
}; |
72 |
|
|
73 |
// A typedef'd parameter QMap. |
// Typedef'd parameter QMap. |
74 |
typedef QMap<QString, qsamplerDeviceParam> qsamplerDeviceParamMap; |
typedef QMap<QString, qsamplerDeviceParam> qsamplerDeviceParamMap; |
75 |
|
|
76 |
|
// Typedef'd device port/channels QptrList. |
77 |
|
typedef QPtrList<qsamplerDevicePort> qsamplerDevicePortList; |
78 |
|
|
79 |
|
|
80 |
//------------------------------------------------------------------------- |
//------------------------------------------------------------------------- |
81 |
// qsamplerDevice - MIDI/Audio Device structure. |
// qsamplerDevice - MIDI/Audio Device structure. |
109 |
const QString& driverName() const; |
const QString& driverName() const; |
110 |
const QString& deviceName() const; |
const QString& deviceName() const; |
111 |
|
|
112 |
|
// Set the proper device parameter value. |
113 |
|
void setParam (const QString& sParam, const QString& sValue); |
114 |
|
|
115 |
// Device parameters accessor. |
// Device parameters accessor. |
116 |
const qsamplerDeviceParamMap& params() const; |
const qsamplerDeviceParamMap& params() const; |
117 |
|
|
118 |
// Set the proper device parameter value. |
// Device port/channel list accessor. |
119 |
void setParam (const QString& sParam, const QString& sValue); |
qsamplerDevicePortList& ports(); |
120 |
|
|
121 |
|
// Device parameter dependency list refreshner. |
122 |
|
int refreshParams(lscp_client_t *pClient); |
123 |
|
// Device port/channel list refreshner. |
124 |
|
int refreshPorts(lscp_client_t *pClient); |
125 |
|
// Refresh/set dependencies given that some parameter has changed. |
126 |
|
int refreshDepends(lscp_client_t *pClient, const QString& sParam); |
127 |
|
|
128 |
// Device ids enumerator. |
// Device ids enumerator. |
129 |
static int *getDevices(lscp_client_t *pClient, |
static int *getDevices(lscp_client_t *pClient, |
135 |
|
|
136 |
private: |
private: |
137 |
|
|
138 |
|
// Refresh/set given parameter based on driver supplied dependencies. |
139 |
|
int refreshParam(lscp_client_t *pClient, const QString& sParam); |
140 |
|
|
141 |
// Instance variables. |
// Instance variables. |
142 |
int m_iDeviceID; |
int m_iDeviceID; |
143 |
qsamplerDeviceType m_deviceType; |
qsamplerDeviceType m_deviceType; |
147 |
|
|
148 |
// Device parameter list. |
// Device parameter list. |
149 |
qsamplerDeviceParamMap m_params; |
qsamplerDeviceParamMap m_params; |
150 |
|
|
151 |
|
// Device port/channel list. |
152 |
|
qsamplerDevicePortList m_ports; |
153 |
}; |
}; |
154 |
|
|
155 |
|
|