56 snd_seq_query_subscribe_malloc(&m_Info);
65 snd_seq_query_subscribe_malloc(&m_Info);
66 snd_seq_query_subscribe_copy(m_Info, other.m_Info);
75 snd_seq_query_subscribe_malloc(&m_Info);
76 snd_seq_query_subscribe_copy(m_Info, other);
84 snd_seq_query_subscribe_free(m_Info);
105 snd_seq_query_subscribe_copy(m_Info, other.m_Info);
116 return snd_seq_query_subscribe_get_client(m_Info);
126 return snd_seq_query_subscribe_get_port(m_Info);
133 const snd_seq_addr_t*
136 return snd_seq_query_subscribe_get_root(m_Info);
147 snd_seq_query_subs_type_t
150 return snd_seq_query_subscribe_get_type(m_Info);
160 return snd_seq_query_subscribe_get_index(m_Info);
170 return snd_seq_query_subscribe_get_num_subs(m_Info);
177 const snd_seq_addr_t*
180 return snd_seq_query_subscribe_get_addr(m_Info);
190 return snd_seq_query_subscribe_get_queue(m_Info);
200 return (snd_seq_query_subscribe_get_exclusive(m_Info) != 0);
210 return (snd_seq_query_subscribe_get_time_update(m_Info) != 0);
220 return (snd_seq_query_subscribe_get_time_real(m_Info) != 0);
230 snd_seq_query_subscribe_set_client(m_Info, client);
240 snd_seq_query_subscribe_set_port(m_Info, port);
250 snd_seq_query_subscribe_set_root(m_Info, addr);
264 snd_seq_query_subscribe_set_type(m_Info, type);
274 snd_seq_query_subscribe_set_index(m_Info, index);
284 return snd_seq_query_subscribe_sizeof();
292 snd_seq_port_subscribe_malloc(&m_Info);
301 snd_seq_port_subscribe_malloc(&m_Info);
302 snd_seq_port_subscribe_copy(m_Info, other.m_Info);
311 snd_seq_port_subscribe_malloc(&m_Info);
312 snd_seq_port_subscribe_copy(m_Info, other);
321 snd_seq_port_subscribe_malloc(&m_Info);
331 snd_seq_port_subscribe_free(m_Info);
354 snd_seq_port_subscribe_copy(m_Info, other.m_Info);
362 const snd_seq_addr_t*
365 return snd_seq_port_subscribe_get_sender(m_Info);
372 const snd_seq_addr_t*
375 return snd_seq_port_subscribe_get_dest(m_Info);
385 return snd_seq_port_subscribe_get_queue(m_Info);
395 return (snd_seq_port_subscribe_get_exclusive(m_Info) != 0);
405 return (snd_seq_port_subscribe_get_time_update(m_Info) != 0);
415 return (snd_seq_port_subscribe_get_time_real(m_Info) != 0);
425 snd_seq_port_subscribe_set_sender(m_Info, addr);
435 snd_seq_port_subscribe_set_dest(m_Info, addr);
445 snd_seq_port_subscribe_set_queue(m_Info, q);
455 snd_seq_port_subscribe_set_exclusive(m_Info, val?1:0);
465 snd_seq_port_subscribe_set_time_update(m_Info, val?1:0);
475 snd_seq_port_subscribe_set_time_real(m_Info, val?1:0);
487 addr.client = client;
501 addr.client = client;
515 if ((m_Info ==
nullptr) || (seq ==
nullptr) || !(seq->
isOpened()))
531 if ((m_Info ==
nullptr) || (seq ==
nullptr) || !(seq->
isOpened()))
545 return snd_seq_port_subscribe_sizeof();
Error checking functions and macros.
void setDest(unsigned char client, unsigned char port)
Sets the Subscription's destination (MIDI IN) port.
Classes managing ALSA Sequencer clients.
Subscriber()
Default constructor.
snd_seq_t * getHandle()
Returns the sequencer handler managed by ALSA.
#define DRUMSTICK_ALSA_CHECK_WARNING(x)
This macro calls the check warning function.
Subscriber container class.
void setType(snd_seq_query_subs_type_t type)
Sets the subscription type.
bool getExclusive()
Gets the subscription's exclusive flag.
void setPort(int port)
Sets the subscriber's port number.
snd_seq_query_subs_type_t getType()
Gets the subscription type (read or write).
void setTimeReal(bool val)
Sets the subscription's time real (time-stamping) flag.
bool getTimeUpdate()
Gets the susbcription's time-update flag.
void unsubscribe(MidiClient *seq)
Breaks the subscription in the ALSA sequencer subsystem.
const snd_seq_addr_t * getAddr()
Gets the subscriber's address.
int getSizeOfInfo() const
Gets the size of the ALSA query subscriber object.
int getNumSubs()
Gets the number of subscribers returned by a query operation.
int getQueue()
Gets the subscriber's queue number.
int getIndex()
Gets the index of the subscriber container.
int getPort()
Gets the subscriober's port number.
void setSender(unsigned char client, unsigned char port)
Sets the Subscription's sender (MIDI OUT) port.
Subscription & operator=(const Subscription &other)
Assignment operator.
virtual ~Subscription()
Destructor.
int getQueue()
Gets the susbcription's queue number.
void setQueue(int queue)
Sets the Subscription's Queue number.
Subscriber * clone()
Copy the current object.
Subscriber & operator=(const Subscriber &other)
Assignment operator.
bool getTimeReal()
Gets the subscriber's time real time-stamp flag.
int getSizeOfInfo() const
Gets the size of the ALSA subscription object.
void subscribe(MidiClient *seq)
Performs the subscription in the ALSA sequencer subsystem.
Subscription()
Default constructor.
bool isOpened()
Returns true if the sequencer is opened.
void setExclusive(bool val)
Sets the subscription's exclusive flag.
void setIndex(int index)
Sets the index of the subscriber.
Subscription * clone()
Copy the current object.
const snd_seq_addr_t * getDest()
Gets the destination address of the subscription (MIDI IN port)
const snd_seq_addr_t * getRoot()
Gets the subscriber's root address.
bool getTimeUpdate()
Gets the susbcriber's time-update flag.
bool getExclusive()
Gets the subscriber's exclusive flag.
virtual ~Subscriber()
Destructor.
bool getTimeReal()
Gets the susbcription's time-real (time-stamping) flag.
void setClient(int client)
Sets the subscriber's client number.
const snd_seq_addr_t * getSender()
Gets the sender address of the subscription (MIDI OUT port)
int getClient()
Gets the subscriber's client number.
void setRoot(snd_seq_addr_t *addr)
Sets the subscriber's root address.
void setTimeUpdate(bool val)
Sets the susbcription's time-update flag.