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.
#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.
|
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.