drumstick
0.5.0
|
Common functionality. More...
#include "macros.h"
#include <qglobal.h>
#include <QString>
#include <QApplication>
#include <QtDebug>
#include <alsa/asoundlib.h>
Go to the source code of this file.
Classes | |
class | SequencerError |
Class used to report errors from the ALSA sequencer. More... | |
Macros | |
#define | CHECK_ERROR(x) (checkErrorAndThrow((x),__PRETTY_FUNCTION__)) |
This macro calls the check error function. More... | |
#define | CHECK_WARNING(x) (checkWarning((x),__PRETTY_FUNCTION__)) |
This macro calls the check warning function. More... | |
Typedefs | |
typedef quint8 | MidiByte |
8-bit unsigned number to be used as a MIDI message parameter | |
Functions | |
int | checkErrorAndThrow (int rc, const char *where) |
Checks the error code for severe errors. More... | |
int | checkWarning (int rc, const char *where) |
Check the error code for warning errors. More... | |
const QString | LIBRARY_VERSION (SND_LIB_VERSION_STR) |
ALSA library version as a constant string. More... | |
Common functionality.
Definition in file drumstickcommon.h.
#define CHECK_ERROR | ( | x | ) | (checkErrorAndThrow((x),__PRETTY_FUNCTION__)) |
This macro calls the check error function.
x | Error code |
Definition at line 140 of file drumstickcommon.h.
Referenced by MidiClient::detachAllPorts(), MidiCodec::MidiCodec(), MidiQueue::MidiQueue(), MidiClient::open(), MidiClient::portAttach(), MidiClient::portDetach(), Timer::Timer(), and MidiQueue::~MidiQueue().
#define CHECK_WARNING | ( | x | ) | (checkWarning((x),__PRETTY_FUNCTION__)) |
This macro calls the check warning function.
x | Error code |
Definition at line 146 of file drumstickcommon.h.
Referenced by MidiClient::_setClientName(), Timer::addAsyncTimerHandler(), MidiPort::applyPortInfo(), MidiClient::close(), MidiClient::connectFrom(), MidiClient::connectTo(), MidiQueue::continueRunning(), Timer::continueRunning(), MidiClient::createSimplePort(), MidiCodec::decode(), MidiClient::deleteSimplePort(), MidiClient::disconnectFrom(), MidiClient::disconnectTo(), MidiClient::drainOutput(), MidiClient::dropInput(), MidiClient::dropInputBuffer(), MidiClient::dropOutput(), MidiClient::dropOutputBuffer(), MidiCodec::encode(), MidiClient::extractOutput(), MidiClient::getClientId(), MidiQueue::getInfo(), MidiQueue::getStatus(), MidiQueue::getTempo(), MidiQueue::getTimer(), Timer::getTimerStatus(), MidiQueue::getUsage(), MidiClient::open(), MidiClient::output(), MidiClient::outputBuffer(), MidiClient::outputDirect(), Timer::pollDescriptors(), MidiClient::pollDescriptorsRevents(), Timer::pollDescriptorsRevents(), PortInfo::PortInfo(), MidiClient::removeEvents(), MidiClient::resetPoolInput(), MidiClient::resetPoolOutput(), MidiCodec::resizeBuffer(), MidiClient::setBlockMode(), MidiQueue::setInfo(), MidiClient::setInputBufferSize(), MidiClient::setOutputBufferSize(), MidiClient::setPoolInfo(), MidiClient::setPoolInput(), MidiClient::setPoolOutput(), MidiClient::setPoolOutputRoom(), MidiQueue::setTempo(), MidiQueue::setTimer(), Timer::setTimerParams(), MidiQueue::setUsage(), MidiQueue::start(), Timer::start(), MidiQueue::stop(), Timer::stop(), Subscription::subscribe(), Subscription::Subscription(), TimerQuery::TimerQuery(), Subscription::unsubscribe(), and Timer::~Timer().
|
inline |
Checks the error code for severe errors.
If the provided error code is less than zero an exception is thrown, containing both the error code and the location.
rc | Error code |
where | Location |
Definition at line 110 of file drumstickcommon.h.
References drumstick::checkErrorAndThrow().
Referenced by drumstick::checkErrorAndThrow().
|
inline |
Check the error code for warning errors.
This method doesn't throw an exception.
rc | Error code |
where | Location |
Definition at line 127 of file drumstickcommon.h.
References drumstick::checkWarning().
Referenced by drumstick::checkWarning().
const QString drumstick::LIBRARY_VERSION | ( | SND_LIB_VERSION_STR | ) |
ALSA library version as a constant string.
This string corresponds to the compilation library, which may be different to the runtime library.