19#ifndef DRUMSTICK_ALSAQUEUE_H
20#define DRUMSTICK_ALSAQUEUE_H
25 #include <alsa/asoundlib.h>
37#if defined(DRUMSTICK_STATIC)
38#define DRUMSTICK_ALSA_EXPORT
40#if defined(drumstick_alsa_EXPORTS)
41#define DRUMSTICK_ALSA_EXPORT Q_DECL_EXPORT
43#define DRUMSTICK_ALSA_EXPORT Q_DECL_IMPORT
61 friend class MidiQueue;
66 explicit QueueInfo(snd_seq_queue_info_t* other);
84 snd_seq_queue_info_t* m_Info;
94 friend class MidiQueue;
99 explicit QueueStatus(snd_seq_queue_status_t* other);
114 snd_seq_queue_status_t* m_Info;
131 friend class MidiQueue;
136 explicit QueueTempo(snd_seq_queue_tempo_t* other);
160 snd_seq_queue_tempo_t* m_Info;
171 friend class MidiQueue;
176 explicit QueueTimer(snd_seq_queue_timer_t* other);
183 snd_seq_queue_timer_type_t
getType();
184 const snd_timer_id_t*
getId();
186 void setType(snd_seq_queue_timer_type_t value);
187 void setId(snd_timer_id_t* value);
192 snd_seq_queue_timer_t* m_Info;
210 int getId()
const {
return m_Id; }
The QObject class is the base class of all Qt objects.
void setTimer(const QueueTimer &value)
Applies q QueueTimer object to the queue.
void setInfo(const QueueInfo &value)
Applies a QueueInfo object to the queue.
int getUsage()
Gets the queue usage flag.
void setTickPosition(snd_seq_tick_time_t pos)
Sets the queue position in musical time (ticks).
void continueRunning()
Start the queue without resetting the last position.
QueueTimer & getTimer()
Gets a QueueTimer object reference.
QueueStatus & getStatus()
Gets a QueueStatus object reference.
void start()
Start the queue.
void stop()
Stop the queue.
MidiQueue(MidiClient *seq, QObject *parent=nullptr)
Constructor.
void setRealTimePosition(snd_seq_real_time_t *pos)
Sets the queue position in real time (clock) units: seconds and nanoseconds.
void clear()
Clear the queue, dropping any scheduled events.
QueueInfo & getInfo()
Gets a QueueInfo object reference.
QueueTempo & getTempo()
Gets a QueueTempo object reference.
void setUsage(int used)
Sets the queue usage flag.
void setTempo(const QueueTempo &value)
Applies a QueueTempo object to the queue.
Queue information container.
bool isLocked()
Returns the locking status of the queue.
int getInfoSize() const
Gets the size of the ALSA queue info object.
unsigned int getFlags()
Gets the flags of the queue.
void setLocked(bool locked)
Sets the locked status of the queue.
int getOwner()
Gets the owner's client id of the queue.
QueueInfo()
Default constructor.
int getId()
Gets the queue's numeric identifier.
QueueInfo * clone()
Copy the current object and return the copy.
void setFlags(unsigned int value)
Sets the bit flags of the queue.
QString getName()
Gets the queue name.
void setName(QString value)
Sets the queue name.
QueueInfo & operator=(const QueueInfo &other)
Assignment operator.
void setOwner(int value)
Sets the client ID of the owner.
int getInfoSize() const
Gets the size of the ALSA status object.
bool isRunning()
Gets the queue's running state.
int getEvents()
Gets the number of queued events.
int getId()
Gets the queue's numeric identifier.
QueueStatus * clone()
Copy the current object and return the copy.
const snd_seq_real_time_t * getRealtime()
Gets the real time (secods and nanoseconds) of the queue.
QueueStatus()
Default constructor.
snd_seq_tick_time_t getTickTime()
Gets the musical time (ticks) of the queue.
double getClockTime()
Gets the clock time in seconds of the queue.
QueueStatus & operator=(const QueueStatus &other)
Assignment operator.
unsigned int getStatusBits()
Gets the running status bits.
int getInfoSize() const
Gets the size of the ALSA queue tempo object.
void setSkewValue(unsigned int value)
Sets the tempo skew numerator.
int getId()
Gets the queue's numeric identifier.
void setPPQ(int value)
Sets the queue resolution in parts per quarter note.
unsigned int getTempo()
Gets the queue's tempo in microseconds per beat.
QueueTempo()
Default constructor.
void setTempo(unsigned int value)
Sets the queue tempo in microseconds per beat.
float getRealBPM()
Gets the queue's real BPM tempo in beats per minute.
unsigned int getSkewValue()
Gets the tempo skew numerator.
float getNominalBPM()
Gets the queue's nominal BPM tempo (in beats per minute)
unsigned int getSkewBase()
Gets the tempo skew base.
QueueTempo * clone()
Copy the current object returning the copied object.
void setSkewBase(unsigned int value)
Sets the tempo skew base.
void setNominalBPM(float value)
Sets the queue's nominal tempo in BPM (beats per minute).
int getPPQ()
Gets the PPQ (parts per quarter note) resolution of the queue.
QueueTempo & operator=(const QueueTempo &other)
Assignment operator.
void setTempoFactor(float value)
Sets the queue's tempo skew factor.
int getInfoSize() const
Gets the size of the ALSA queue timer object.
snd_seq_queue_timer_type_t getType()
Gets the timer type.
const snd_timer_id_t * getId()
Gets the timer identifier record.
QueueTimer()
Default constructor.
QueueTimer & operator=(const QueueTimer &other)
Assignment operator.
void setResolution(unsigned int value)
Sets the timer resolution.
QueueTimer * clone()
Copy the current object and return the copy.
unsigned int getResolution()
Gets the timer resolution.
int getQueueId()
The queue's numeric identifier.
void setId(snd_timer_id_t *value)
Sets the timer identifier record.
void setType(snd_seq_queue_timer_type_t value)
Sets the timer type.
ALSA Timer identifier container.
Drumstick ALSA library wrapper.