20 #ifndef DRUMSTICK_ALSACLIENT_H 21 #define DRUMSTICK_ALSACLIENT_H 26 #include <QReadWriteLock> 41 class SequencerInputThread;
62 int getSizeOfInfo()
const;
65 snd_seq_client_type_t getClientType();
67 bool getBroadcastFilter();
68 bool getErrorBounce();
71 void setClient(
int client);
72 void setName(QString name);
73 void setBroadcastFilter(
bool val);
74 void setErrorBounce(
bool val);
77 #if SND_LIB_VERSION > 0x010010 78 void addFilter(
int eventType);
79 bool isFiltered(
int eventType);
81 void removeFilter(
int eventType);
88 const unsigned char* getEventFilter() __attribute__((deprecated));
89 void setEventFilter(
unsigned char* filter) __attribute__((deprecated));
92 snd_seq_client_info_t* m_Info;
119 int getSizeOfInfo()
const;
124 int getMaxChannels();
125 int getCurrentQueues();
126 int getCurrentClients();
129 snd_seq_system_info_t* m_Info;
145 PoolInfo(snd_seq_client_pool_t* other);
150 int getSizeOfInfo()
const;
158 void setInputPool(
int size);
159 void setOutputPool(
int size);
160 void setOutputRoom(
int size);
163 snd_seq_client_pool_t* m_Info;
205 void open(
const QString deviceName =
"default",
206 const int openMode = SND_SEQ_OPEN_DUPLEX,
207 const bool blockMode =
false );
208 void open( snd_config_t* conf,
209 const QString deviceName =
"default",
210 const int openMode = SND_SEQ_OPEN_DUPLEX,
211 const bool blockMode =
false );
213 void startSequencerInput();
214 void stopSequencerInput();
217 MidiQueue* createQueue(QString
const& name);
220 MidiQueue* useQueue(
const QString& name);
224 void detachAllPorts();
225 void addEventFilter(
int evtype);
226 void output(
SequencerEvent* ev,
bool async =
false,
int timeout = -1);
227 void outputDirect(
SequencerEvent* ev,
bool async =
false,
int timeout = -1);
229 void drainOutput(
bool async =
false,
int timeout = -1);
230 void synchronizeOutput();
233 snd_seq_type_t getSequencerType();
234 snd_seq_t* getHandle();
237 size_t getOutputBufferSize();
238 void setOutputBufferSize(
size_t newSize);
239 size_t getInputBufferSize();
240 void setInputBufferSize(
size_t newSize);
241 QString getDeviceName();
244 void setBlockMode(
bool newValue);
245 QString getClientName();
246 QString getClientName(
const int clientId);
247 void setClientName(QString
const& newName);
248 bool getBroadcastFilter();
249 void setBroadcastFilter(
bool newValue);
250 bool getErrorBounce();
251 void setErrorBounce(
bool newValue);
254 void setThisClientInfo(
const ClientInfo& val);
256 ClientInfoList getAvailableClients();
260 QList<int> getAvailableQueues();
263 void setPoolInfo(
const PoolInfo& info);
264 void setPoolInput(
int size);
265 void setPoolOutput(
int size);
266 void setPoolOutputRoom(
int size);
267 void resetPoolInput();
268 void resetPoolOutput();
270 void dropInputBuffer();
272 void dropOutputBuffer();
276 int inputPending(
bool fetch);
277 int getQueueId(
const QString& name);
279 void addListener(
QObject* listener);
280 void removeListener(
QObject* listener);
281 void setEventsEnabled(
const bool bEnabled);
282 bool getEventsEnabled()
const;
284 bool parseAddress(
const QString& straddr, snd_seq_addr& result );
285 void setRealTimeInput(
bool enabled);
286 bool realTimeInputEnabled();
294 void applyClientInfo();
297 void updateAvailablePorts();
301 const char * _getDeviceName();
302 int getPollDescriptorsCount(
short events);
303 int pollDescriptors(
struct pollfd *pfds,
unsigned int space,
short events);
304 unsigned short pollDescriptorsRevents(
struct pollfd *pfds,
unsigned int nfds);
307 void _setClientName(
const char *name );
308 int createSimplePort(
const char *name,
311 void deleteSimplePort(
int port );
312 void connectFrom(
int myport,
int client,
int port);
313 void connectTo(
int myport,
int client,
int port);
314 void disconnectFrom(
int myport,
int client,
int port);
315 void disconnectTo(
int myport,
int client,
int port);
319 class MidiClientPrivate;
320 MidiClientPrivate *d;
323 #if SND_LIB_VERSION > 0x010004 324 DRUMSTICK_EXPORT QString getRuntimeALSALibraryVersion();
325 DRUMSTICK_EXPORT
int getRuntimeALSALibraryNumber();
334 #endif // DRUMSTICK_ALSACLIENT_H QList< ClientInfo > ClientInfoList
List of sequencer client information.
The QObject class is the base class of all Qt objects.
Base class for the event's hierarchy.
QList< PortInfo > PortInfoList
List of port information objects.
Sequencer Pool information.
Classes managing ALSA Sequencer ports.
Sequencer events handler.
int getRuntimeALSADriverNumber()
Gets the runtime ALSA drivers version number.
Auxiliary class to remove events from an ALSA queue.
virtual ~SequencerEventHandler()
Destructor.
QString getRuntimeALSADriverVersion()
Gets the runtime ALSA drivers version string.
QList< MidiPort * > MidiPortList
List of Ports instances.