lmms
Cross-platform music production software
Toggle main menu visibility
Loading...
Searching...
No Matches
include
MidiAlsaRaw.h
Go to the documentation of this file.
1
/*
2
* MidiAlsaRaw.h - MIDI client for RawMIDI via ALSA
3
*
4
* Copyright (c) 2005-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
5
*
6
* This file is part of LMMS - https://lmms.io
7
*
8
* This program is free software; you can redistribute it and/or
9
* modify it under the terms of the GNU General Public
10
* License as published by the Free Software Foundation; either
11
* version 2 of the License, or (at your option) any later version.
12
*
13
* This program is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
* General Public License for more details.
17
*
18
* You should have received a copy of the GNU General Public
19
* License along with this program (see COPYING); if not, write to the
20
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21
* Boston, MA 02110-1301 USA.
22
*
23
*/
24
25
#ifndef LMMS_MIDI_ALSA_RAW_H
26
#define LMMS_MIDI_ALSA_RAW_H
27
28
#include "lmmsconfig.h"
29
30
#ifdef LMMS_HAVE_ALSA
31
32
#include <alsa/asoundlib.h>
33
34
#include <QThread>
35
36
#include "
MidiClient.h
"
37
38
39
struct
pollfd;
40
41
42
namespace
lmms
43
{
44
45
class
MidiAlsaRaw
:
public
QThread,
public
MidiClientRaw
46
{
47
Q_OBJECT
48
public
:
49
MidiAlsaRaw
();
50
~MidiAlsaRaw
()
override
;
51
52
static
QString
probeDevice
();
53
54
55
inline
static
QString
name
()
56
{
57
return
QT_TRANSLATE_NOOP(
"MidiSetupWidget"
,
58
"ALSA Raw-MIDI (Advanced Linux Sound Architecture)"
);
59
}
60
61
inline
static
QString
configSection
()
62
{
63
return
"MidiAlsaRaw"
;
64
}
65
66
67
protected
:
68
void
sendByte
(
const
unsigned
char
c )
override
;
69
void
run
()
override
;
70
71
72
private
:
73
snd_rawmidi_t *
m_input
, * *
m_inputp
;
74
snd_rawmidi_t *
m_output
, * *
m_outputp
;
75
int
m_npfds
;
76
pollfd *
m_pfds
;
77
78
volatile
bool
m_quit
;
79
80
} ;
81
82
83
}
// namespace lmms
84
85
#endif
// LMMS_HAVE_ALSA
86
87
#endif
// LMMS_MIDI_ALSA_RAW_H
MidiClient.h
lmms::MidiAlsaRaw::name
static QString name()
Definition
MidiAlsaRaw.h:55
lmms::MidiAlsaRaw::m_outputp
snd_rawmidi_t ** m_outputp
Definition
MidiAlsaRaw.h:74
lmms::MidiAlsaRaw::probeDevice
static QString probeDevice()
Definition
MidiAlsaRaw.cpp:78
lmms::MidiAlsaRaw::sendByte
void sendByte(const unsigned char c) override
Definition
MidiAlsaRaw.cpp:95
lmms::MidiAlsaRaw::m_inputp
snd_rawmidi_t ** m_inputp
Definition
MidiAlsaRaw.h:73
lmms::MidiAlsaRaw::m_input
snd_rawmidi_t * m_input
Definition
MidiAlsaRaw.h:73
lmms::MidiAlsaRaw::m_pfds
pollfd * m_pfds
Definition
MidiAlsaRaw.h:76
lmms::MidiAlsaRaw::configSection
static QString configSection()
Definition
MidiAlsaRaw.h:61
lmms::MidiAlsaRaw::m_npfds
int m_npfds
Definition
MidiAlsaRaw.h:75
lmms::MidiAlsaRaw::run
void run() override
Definition
MidiAlsaRaw.cpp:103
lmms::MidiAlsaRaw::m_quit
volatile bool m_quit
Definition
MidiAlsaRaw.h:78
lmms::MidiAlsaRaw::m_output
snd_rawmidi_t * m_output
Definition
MidiAlsaRaw.h:74
lmms::MidiAlsaRaw::MidiAlsaRaw
MidiAlsaRaw()
Definition
MidiAlsaRaw.cpp:36
lmms::MidiClientRaw::MidiClientRaw
MidiClientRaw()=default
lmms
Definition
RemotePluginBase.cpp:34
Generated on
for lmms by
1.18.0