drumstick  1.1.0
MidiQueue Class Reference

Queue management. More...

#include <alsaqueue.h>

Inheritance diagram for MidiQueue:

Public Member Functions

 MidiQueue (MidiClient *seq, QObject *parent=0)
 Constructor. More...
 
 MidiQueue (MidiClient *seq, const QueueInfo &info, QObject *parent=0)
 Constructor. More...
 
 MidiQueue (MidiClient *seq, const QString name, QObject *parent=0)
 Constructor. More...
 
 MidiQueue (MidiClient *seq, const int queue_id, QObject *parent=0)
 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 188 of file alsaqueue.h.

Constructor & Destructor Documentation

MidiQueue ( MidiClient seq,
QObject parent = 0 
)
explicit

Constructor.

Parameters
seqAn existing MidiClient instance
parentAn optional parent object

Definition at line 688 of file alsaqueue.cpp.

References CHECK_ERROR, and MidiClient::getHandle().

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

Constructor.

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

Definition at line 702 of file alsaqueue.cpp.

References CHECK_ERROR, and MidiClient::getHandle().

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

Constructor.

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

Definition at line 717 of file alsaqueue.cpp.

References CHECK_ERROR, and MidiClient::getHandle().

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

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 733 of file alsaqueue.cpp.

Member Function Documentation

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 871 of file alsaqueue.cpp.

References CHECK_WARNING, and MidiClient::getHandle().

Referenced by SequencerOutputThread::run().

QueueInfo & getInfo ( )

Gets a QueueInfo object reference.

Returns
A QueueInfo object reference
Examples:
sysinfo.cpp.

Definition at line 756 of file alsaqueue.cpp.

References CHECK_WARNING, and MidiClient::getHandle().

QueueStatus & getStatus ( )

Gets a QueueStatus object reference.

Returns
A QueueStatus object reference
Examples:
sysinfo.cpp.

Definition at line 766 of file alsaqueue.cpp.

References CHECK_WARNING, and MidiClient::getHandle().

Referenced by SequencerOutputThread::syncOutput().

QueueTempo & getTempo ( )

Gets a QueueTempo object reference.

Returns
A QueueTempo object reference
Examples:
sysinfo.cpp.

Definition at line 776 of file alsaqueue.cpp.

References CHECK_WARNING, and MidiClient::getHandle().

QueueTimer & getTimer ( )

Gets a QueueTimer object reference.

Returns
A QueueTimer object reference
Examples:
sysinfo.cpp.

Definition at line 786 of file alsaqueue.cpp.

References CHECK_WARNING, and MidiClient::getHandle().

int getUsage ( )

Gets the queue usage flag.

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

Definition at line 827 of file alsaqueue.cpp.

References CHECK_WARNING, and MidiClient::getHandle().

void setInfo ( const QueueInfo value)

Applies a QueueInfo object to the queue.

Parameters
valueA QueueInfo object reference

Definition at line 796 of file alsaqueue.cpp.

References CHECK_WARNING, and MidiClient::getHandle().

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 902 of file alsaqueue.cpp.

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

void setTempo ( const QueueTempo value)

Applies a QueueTempo object to the queue.

Parameters
valueA QueueTempo object reference

Definition at line 806 of file alsaqueue.cpp.

References CHECK_WARNING, and MidiClient::getHandle().

void setTickPosition ( snd_seq_tick_time_t  pos)

Sets the queue position in musical time (ticks).

Parameters
posMusical time in ticks.

Definition at line 890 of file alsaqueue.cpp.

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

Referenced by SequencerOutputThread::run().

void setTimer ( const QueueTimer value)

Applies q QueueTimer object to the queue.

Parameters
valueA QueueTimer object reference

Definition at line 816 of file alsaqueue.cpp.

References CHECK_WARNING, and MidiClient::getHandle().

void setUsage ( int  used)

Sets the queue usage flag.

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

Definition at line 837 of file alsaqueue.cpp.

References CHECK_WARNING, and MidiClient::getHandle().

void start ( )

Start the queue.

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

Definition at line 847 of file alsaqueue.cpp.

References CHECK_WARNING, and MidiClient::getHandle().

Referenced by SequencerOutputThread::run().

void stop ( )

Stop the queue.

This method should stop running the queue.

Definition at line 858 of file alsaqueue.cpp.

References CHECK_WARNING, and MidiClient::getHandle().

Referenced by SequencerOutputThread::run().


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