LMMS
Loading...
Searching...
No Matches
MidiSndio.h
Go to the documentation of this file.
1/*
2 * MidiSndio.h - base-class that implements sndio midi support
3 *
4 * Copyright (c) 2010-2016 jackmsr@openbsd.net
5 * Copyright (c) 2016-2017 David Carlier <devnexen@gmail.com>
6 *
7 * This file is part of LMMS - https://lmms.io
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public
11 * License as published by the Free Software Foundation; either
12 * version 2 of the License, or (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public
20 * License along with this program (see COPYING); if not, write to the
21 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22 * Boston, MA 02110-1301 USA.
23 *
24 */
25
26#ifndef LMMS_MIDI_SNDIO_H
27#define LMMS_MIDI_SNDIO_H
28
29#include "lmmsconfig.h"
30
31#ifdef LMMS_HAVE_SNDIO
32
33#include <QThread>
34
35#include "MidiClient.h"
36
37
38struct mio_hdl;
39
40namespace lmms
41{
42
43
44class MidiSndio : public QThread, public MidiClientRaw
45{
46 Q_OBJECT
47public:
48 MidiSndio();
49 ~MidiSndio() override;
50
51 static QString probeDevice();
52
53 inline static QString name()
54 {
55 return QT_TRANSLATE_NOOP("MidiSetupWidget", "sndio MIDI");
56 }
57
58 inline static QString configSection()
59 {
60 return "MidiSndio";
61 }
62
63
64protected:
65 void sendByte(const unsigned char c) override;
66 void run() override;
67
68private:
69 mio_hdl *m_hdl;
70 volatile bool m_quit;
71} ;
72
73
74} // namespace lmms
75
76#endif // LMMS_HAVE_SNDIO
77
78#endif // LMMS_MIDI_SNDIO_H
MidiClientRaw()=default
volatile bool m_quit
Definition MidiSndio.h:70
mio_hdl * m_hdl
Definition MidiSndio.h:69
static QString configSection()
Definition MidiSndio.h:58
void sendByte(const unsigned char c) override
Definition MidiSndio.cpp:85
void run() override
Definition MidiSndio.cpp:91
static QString probeDevice()
Definition MidiSndio.cpp:77
static QString name()
Definition MidiSndio.h:53
~MidiSndio() override
Definition MidiSndio.cpp:66
MidiSndio()
Definition MidiSndio.cpp:41
Definition AudioAlsa.cpp:35
return c
Definition crypt.c:175