drumstick 2.9.0
C++ MIDI libraries using Qt objects, idioms, and style.

Queue management. More...

#include <alsaqueue.h>

Inheritance diagram for MidiQueue:

Public Member Functions

 MidiQueue (MidiClient *seq, QObject *parent=nullptr)
 Constructor. More...
 
 MidiQueue (MidiClient *seq, const QueueInfo &info, QObject *parent=nullptr)
 Constructor. More...
 
 MidiQueue (MidiClient *seq, const QString name, QObject *parent=nullptr)
 Constructor. More...
 
 MidiQueue (MidiClient *seq, const int queue_id, QObject *parent=nullptr)
 Constructor. More...
 
virtual ~MidiQueue ()
 Destructor.
 
void start ()
 Start the queue. More...
 
void stop ()
 Stop the queue. More...
 
void continueRunning ()
 Start the queue without resetting the last position. More...
 
void clear ()
 Clear the queue, dropping any scheduled events.
 
void setTickPosition (snd_seq_tick_time_t pos)
 Sets the queue position in musical time (ticks). More...
 
void setRealTimePosition (snd_seq_real_time_t *pos)
 Sets the queue position in real time (clock) units: seconds and nanoseconds. More...
 
QueueInfogetInfo ()
 Gets a QueueInfo object reference. More...
 
QueueStatusgetStatus ()
 Gets a QueueStatus object reference. More...
 
QueueTempogetTempo ()
 Gets a QueueTempo object reference. More...
 
QueueTimergetTimer ()
 Gets a QueueTimer object reference. More...
 
int getUsage ()
 Gets the queue usage flag. More...
 
void setInfo (const QueueInfo &value)
 Applies a QueueInfo object to the queue. More...
 
void setTempo (const QueueTempo &value)
 Applies a QueueTempo object to the queue. More...
 
void setTimer (const QueueTimer &value)
 Applies q QueueTimer object to the queue. More...
 
void setUsage (int used)
 Sets the queue usage flag. More...
 

Detailed Description

Queue management.

This class represents an ALSA sequencer queue object.

Examples
drumgrid.cpp, dumpmid.cpp, guiplayer.cpp, metronome.cpp, playsmf.cpp, and sysinfo.cpp.

Definition at line 200 of file alsaqueue.h.

Constructor & Destructor Documentation

◆ MidiQueue() [1/4]

MidiQueue ( MidiClient seq,
QObject parent = nullptr 
)
explicit

Constructor.

Parameters
seqAn existing MidiClient instance
parentAn optional parent object

Definition at line 703 of file alsaqueue.cpp.

References DRUMSTICK_ALSA_CHECK_ERROR, and MidiClient::getHandle().

◆ MidiQueue() [2/4]

MidiQueue ( MidiClient seq,
const QueueInfo info,
QObject parent = nullptr 
)

Constructor.

Parameters
seqAn existing MidiClient instance
infoA QueueInfo object reference
parentAn optional parent object

Definition at line 717 of file alsaqueue.cpp.

References DRUMSTICK_ALSA_CHECK_ERROR, and MidiClient::getHandle().

◆ MidiQueue() [3/4]

MidiQueue ( MidiClient seq,
const QString  name,
QObject parent = nullptr 
)

Constructor.

Parameters
seqAn existing MidiClient instance
nameThe name for the new queue
parentAn optional parent object

Definition at line 732 of file alsaqueue.cpp.

References DRUMSTICK_ALSA_CHECK_ERROR, and MidiClient::getHandle().

◆ MidiQueue() [4/4]

MidiQueue ( MidiClient seq,
const int  queue_id,
QObject parent = nullptr 
)

Constructor.

Note: this constructor doesn't allocate a new queue, it uses an existing one.

Parameters
seqAn existing MidiClient instance
queue_idAn existing queue numeric identifier
parentAn optional parent object

Definition at line 748 of file alsaqueue.cpp.

Member Function Documentation

◆ continueRunning()

void continueRunning ( )

Start the queue without resetting the last position.

This method should start running the queue from the last position set.

Definition at line 886 of file alsaqueue.cpp.

References DRUMSTICK_ALSA_CHECK_WARNING, and MidiClient::getHandle().

Referenced by SequencerOutputThread::run().

◆ getInfo()

QueueInfo & getInfo ( )

Gets a QueueInfo object reference.

Returns
A QueueInfo object reference
Examples
sysinfo.cpp.

Definition at line 771 of file alsaqueue.cpp.

References DRUMSTICK_ALSA_CHECK_WARNING, and MidiClient::getHandle().

◆ getStatus()

QueueStatus & getStatus ( )

Gets a QueueStatus object reference.

Returns
A QueueStatus object reference
Examples
sysinfo.cpp.

Definition at line 781 of file alsaqueue.cpp.

References DRUMSTICK_ALSA_CHECK_WARNING, and MidiClient::getHandle().

◆ getTempo()

QueueTempo & getTempo ( )

Gets a QueueTempo object reference.

Returns
A QueueTempo object reference
Examples
sysinfo.cpp.

Definition at line 791 of file alsaqueue.cpp.

References DRUMSTICK_ALSA_CHECK_WARNING, and MidiClient::getHandle().

◆ getTimer()

QueueTimer & getTimer ( )

Gets a QueueTimer object reference.

Returns
A QueueTimer object reference
Examples
sysinfo.cpp.

Definition at line 801 of file alsaqueue.cpp.

References DRUMSTICK_ALSA_CHECK_WARNING, and MidiClient::getHandle().

◆ getUsage()

int getUsage ( )

Gets the queue usage flag.

Returns
1 = client is allowed to access the queue, 0 = not allowed.

Definition at line 842 of file alsaqueue.cpp.

References DRUMSTICK_ALSA_CHECK_WARNING, and MidiClient::getHandle().

◆ setInfo()

void setInfo ( const QueueInfo value)

Applies a QueueInfo object to the queue.

Parameters
valueA QueueInfo object reference

Definition at line 811 of file alsaqueue.cpp.

References DRUMSTICK_ALSA_CHECK_WARNING, and MidiClient::getHandle().

◆ setRealTimePosition()

void setRealTimePosition ( snd_seq_real_time_t *  pos)

Sets the queue position in real time (clock) units: seconds and nanoseconds.

Parameters
posReal time (clock) position in seconds/nanoseconds.

Definition at line 917 of file alsaqueue.cpp.

References SequencerEvent::getHandle(), and MidiClient::outputDirect().

◆ setTempo()

void setTempo ( const QueueTempo value)

Applies a QueueTempo object to the queue.

Parameters
valueA QueueTempo object reference

Definition at line 821 of file alsaqueue.cpp.

References DRUMSTICK_ALSA_CHECK_WARNING, and MidiClient::getHandle().

◆ setTickPosition()

void setTickPosition ( snd_seq_tick_time_t  pos)

Sets the queue position in musical time (ticks).

Parameters
posMusical time in ticks.

Definition at line 905 of file alsaqueue.cpp.

References SequencerEvent::getHandle(), and MidiClient::outputDirect().

Referenced by SequencerOutputThread::run().

◆ setTimer()

void setTimer ( const QueueTimer value)

Applies q QueueTimer object to the queue.

Parameters
valueA QueueTimer object reference

Definition at line 831 of file alsaqueue.cpp.

References DRUMSTICK_ALSA_CHECK_WARNING, and MidiClient::getHandle().

◆ setUsage()

void setUsage ( int  used)

Sets the queue usage flag.

Parameters
used1 = client is allowed to access the queue, 0 = not allowed.

Definition at line 852 of file alsaqueue.cpp.

References DRUMSTICK_ALSA_CHECK_WARNING, and MidiClient::getHandle().

◆ start()

void start ( )

Start the queue.

This method should start running the queue from the initial position.

Definition at line 862 of file alsaqueue.cpp.

References DRUMSTICK_ALSA_CHECK_WARNING, and MidiClient::getHandle().

Referenced by SequencerOutputThread::run().

◆ stop()

void stop ( )

Stop the queue.

This method should stop running the queue.

Definition at line 873 of file alsaqueue.cpp.

References DRUMSTICK_ALSA_CHECK_WARNING, and MidiClient::getHandle().

Referenced by SequencerOutputThread::run().


The documentation for this class was generated from the following files: