19 #ifndef DRUMSTICK_ALSACLIENT_H 20 #define DRUMSTICK_ALSACLIENT_H 25 #include <QReadWriteLock> 40 class SequencerInputThread;
61 int getSizeOfInfo()
const;
64 snd_seq_client_type_t getClientType();
66 bool getBroadcastFilter();
67 bool getErrorBounce();
70 void setClient(
int client);
71 void setName(QString name);
72 void setBroadcastFilter(
bool val);
73 void setErrorBounce(
bool val);
76 #if SND_LIB_VERSION > 0x010010 77 void addFilter(
int eventType);
78 bool isFiltered(
int eventType);
80 void removeFilter(
int eventType);
87 const unsigned char* getEventFilter() __attribute__((deprecated));
88 void setEventFilter(
unsigned char* filter) __attribute__((deprecated));
91 snd_seq_client_info_t* m_Info;
118 int getSizeOfInfo()
const;
123 int getMaxChannels();
124 int getCurrentQueues();
125 int getCurrentClients();
128 snd_seq_system_info_t* m_Info;
144 PoolInfo(snd_seq_client_pool_t* other);
149 int getSizeOfInfo()
const;
157 void setInputPool(
int size);
158 void setOutputPool(
int size);
159 void setOutputRoom(
int size);
162 snd_seq_client_pool_t* m_Info;
204 void open(
const QString deviceName =
"default",
205 const int openMode = SND_SEQ_OPEN_DUPLEX,
206 const bool blockMode =
false );
207 void open( snd_config_t* conf,
208 const QString deviceName =
"default",
209 const int openMode = SND_SEQ_OPEN_DUPLEX,
210 const bool blockMode =
false );
212 void startSequencerInput();
213 void stopSequencerInput();
216 MidiQueue* createQueue(QString
const& name);
219 MidiQueue* useQueue(
const QString& name);
223 void detachAllPorts();
224 void addEventFilter(
int evtype);
225 void output(
SequencerEvent* ev,
bool async =
false,
int timeout = -1);
226 void outputDirect(
SequencerEvent* ev,
bool async =
false,
int timeout = -1);
228 void drainOutput(
bool async =
false,
int timeout = -1);
229 void synchronizeOutput();
232 snd_seq_type_t getSequencerType();
233 snd_seq_t* getHandle();
236 size_t getOutputBufferSize();
237 void setOutputBufferSize(
size_t newSize);
238 size_t getInputBufferSize();
239 void setInputBufferSize(
size_t newSize);
240 QString getDeviceName();
243 void setBlockMode(
bool newValue);
244 QString getClientName();
245 QString getClientName(
const int clientId);
246 void setClientName(QString
const& newName);
247 bool getBroadcastFilter();
248 void setBroadcastFilter(
bool newValue);
249 bool getErrorBounce();
250 void setErrorBounce(
bool newValue);
253 void setThisClientInfo(
const ClientInfo& val);
255 ClientInfoList getAvailableClients();
259 QList<int> getAvailableQueues();
262 void setPoolInfo(
const PoolInfo& info);
263 void setPoolInput(
int size);
264 void setPoolOutput(
int size);
265 void setPoolOutputRoom(
int size);
266 void resetPoolInput();
267 void resetPoolOutput();
269 void dropInputBuffer();
271 void dropOutputBuffer();
275 int inputPending(
bool fetch);
276 int getQueueId(
const QString& name);
278 void addListener(
QObject* listener);
279 void removeListener(
QObject* listener);
280 void setEventsEnabled(
const bool bEnabled);
281 bool getEventsEnabled()
const;
283 bool parseAddress(
const QString& straddr, snd_seq_addr& result );
284 void setRealTimeInput(
bool enabled);
285 bool realTimeInputEnabled();
293 void applyClientInfo();
296 void updateAvailablePorts();
300 const char * _getDeviceName();
301 int getPollDescriptorsCount(
short events);
302 int pollDescriptors(
struct pollfd *pfds,
unsigned int space,
short events);
303 unsigned short pollDescriptorsRevents(
struct pollfd *pfds,
unsigned int nfds);
306 void _setClientName(
const char *name );
307 int createSimplePort(
const char *name,
310 void deleteSimplePort(
int port );
311 void connectFrom(
int myport,
int client,
int port);
312 void connectTo(
int myport,
int client,
int port);
313 void disconnectFrom(
int myport,
int client,
int port);
314 void disconnectTo(
int myport,
int client,
int port);
318 class MidiClientPrivate;
319 MidiClientPrivate *d;
322 #if SND_LIB_VERSION > 0x010004 323 DRUMSTICK_EXPORT QString getRuntimeALSALibraryVersion();
324 DRUMSTICK_EXPORT
int getRuntimeALSALibraryNumber();
333 #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.