projects
/
ardour.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add option to disable plotting collected signal in analysis.
[ardour.git]
/
libs
/
backends
/
alsa
/
alsa_sequencer.cc
diff --git
a/libs/backends/alsa/alsa_sequencer.cc
b/libs/backends/alsa/alsa_sequencer.cc
index aa0aac09fa9f7ee7186d7e3c6ce014cf7868bd82..036ea5abc6961819d2ba0d3a8f9a5fa98ab6d503 100644
(file)
--- a/
libs/backends/alsa/alsa_sequencer.cc
+++ b/
libs/backends/alsa/alsa_sequencer.cc
@@
-23,24
+23,21
@@
#include "alsa_sequencer.h"
#include "pbd/error.h"
#include "alsa_sequencer.h"
#include "pbd/error.h"
-#include "i18n.h"
+#include "
pbd/
i18n.h"
using namespace ARDOUR;
using namespace ARDOUR;
-/* max bytes per individual midi-event
- * events larger than this are ignored */
-#define MaxAlsaSeqEventSize (64)
-
#ifndef NDEBUG
#define _DEBUGPRINT(STR) fprintf(stderr, STR);
#else
#define _DEBUGPRINT(STR) ;
#endif
#ifndef NDEBUG
#define _DEBUGPRINT(STR) fprintf(stderr, STR);
#else
#define _DEBUGPRINT(STR) ;
#endif
-AlsaSeqMidiIO::AlsaSeqMidiIO (const char *device, const bool input)
+AlsaSeqMidiIO::AlsaSeqMidiIO (const
std::string &name, const
char *device, const bool input)
: AlsaMidiIO()
, _seq (0)
{
: AlsaMidiIO()
, _seq (0)
{
+ _name = name;
init (device, input);
}
init (device, input);
}
@@
-117,8
+114,8
@@
initerr:
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
-AlsaSeqMidiOut::AlsaSeqMidiOut (const char *device)
- : AlsaSeqMidiIO (device, false)
+AlsaSeqMidiOut::AlsaSeqMidiOut (const
std::string &name, const
char *device)
+ : AlsaSeqMidiIO (
name,
device, false)
, AlsaMidiOut ()
{
}
, AlsaMidiOut ()
{
}
@@
-129,12
+126,12
@@
AlsaSeqMidiOut::main_process_thread ()
_running = true;
bool need_drain = false;
snd_midi_event_t *alsa_codec = NULL;
_running = true;
bool need_drain = false;
snd_midi_event_t *alsa_codec = NULL;
- snd_midi_event_new (MaxAlsa
Seq
EventSize, &alsa_codec);
+ snd_midi_event_new (MaxAlsa
Midi
EventSize, &alsa_codec);
pthread_mutex_lock (&_notify_mutex);
while (_running) {
bool have_data = false;
struct MidiEventHeader h(0,0);
pthread_mutex_lock (&_notify_mutex);
while (_running) {
bool have_data = false;
struct MidiEventHeader h(0,0);
- uint8_t data[MaxAlsa
Seq
EventSize];
+ uint8_t data[MaxAlsa
Midi
EventSize];
const uint32_t read_space = _rb->read_space();
const uint32_t read_space = _rb->read_space();
@@
-144,7
+141,7
@@
AlsaSeqMidiOut::main_process_thread ()
break;
}
assert (read_space >= h.size);
break;
}
assert (read_space >= h.size);
- if (h.size > MaxAlsa
Seq
EventSize) {
+ if (h.size > MaxAlsa
Midi
EventSize) {
_rb->increment_read_idx (h.size);
_DEBUGPRINT("AlsaSeqMidiOut: MIDI event too large!\n");
continue;
_rb->increment_read_idx (h.size);
_DEBUGPRINT("AlsaSeqMidiOut: MIDI event too large!\n");
continue;
@@
-227,8
+224,8
@@
retry:
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
-AlsaSeqMidiIn::AlsaSeqMidiIn (const char *device)
- : AlsaSeqMidiIO (device, true)
+AlsaSeqMidiIn::AlsaSeqMidiIn (const
std::string &name, const
char *device)
+ : AlsaSeqMidiIO (
name,
device, true)
, AlsaMidiIn ()
{
}
, AlsaMidiIn ()
{
}
@@
-239,7
+236,7
@@
AlsaSeqMidiIn::main_process_thread ()
_running = true;
bool do_poll = true;
snd_midi_event_t *alsa_codec = NULL;
_running = true;
bool do_poll = true;
snd_midi_event_t *alsa_codec = NULL;
- snd_midi_event_new (MaxAlsa
Seq
EventSize, &alsa_codec);
+ snd_midi_event_new (MaxAlsa
Midi
EventSize, &alsa_codec);
while (_running) {
while (_running) {
@@
-274,7
+271,7
@@
AlsaSeqMidiIn::main_process_thread ()
break;
}
break;
}
- uint8_t data[MaxAlsa
Seq
EventSize];
+ uint8_t data[MaxAlsa
Midi
EventSize];
snd_midi_event_reset_decode (alsa_codec);
ssize_t size = snd_midi_event_decode (alsa_codec, data, sizeof(data), event);
snd_midi_event_reset_decode (alsa_codec);
ssize_t size = snd_midi_event_decode (alsa_codec, data, sizeof(data), event);