summaryrefslogtreecommitdiff
path: root/libs/ardour/midi_buffer.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2013-07-24 19:29:45 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2013-07-24 19:29:45 -0400
commit9ac6bb9befa047a6c349bed02d40da84600b67cc (patch)
tree5b88f453b8f43d2a43b31cb15b0b50acd6f9eb4a /libs/ardour/midi_buffer.cc
parent3d95822716d2e52b54a5bdbe7be4478ab034f8db (diff)
part-way through getting the audioengine changes to compile
Diffstat (limited to 'libs/ardour/midi_buffer.cc')
-rw-r--r--libs/ardour/midi_buffer.cc49
1 files changed, 0 insertions, 49 deletions
diff --git a/libs/ardour/midi_buffer.cc b/libs/ardour/midi_buffer.cc
index b47c3ca152..0b0e61000d 100644
--- a/libs/ardour/midi_buffer.cc
+++ b/libs/ardour/midi_buffer.cc
@@ -190,55 +190,6 @@ MidiBuffer::push_back(TimeType time, size_t size, const uint8_t* data)
return true;
}
-
-/** Push an event into the buffer.
- *
- * Note that the raw MIDI pointed to by ev will be COPIED and unmodified.
- * That is, the caller still owns it, if it needs freeing it's Not My Problem(TM).
- * Realtime safe.
- * @return false if operation failed (not enough room)
- */
-bool
-MidiBuffer::push_back(const jack_midi_event_t& ev)
-{
- const size_t stamp_size = sizeof(TimeType);
-
- if (_size + stamp_size + ev.size >= _capacity) {
- cerr << "MidiBuffer::push_back failed (buffer is full)" << endl;
- return false;
- }
-
- if (!Evoral::midi_event_is_valid(ev.buffer, ev.size)) {
- cerr << "WARNING: MidiBuffer ignoring illegal MIDI event" << endl;
- return false;
- }
-
-#ifndef NDEBUG
- if (DEBUG::MidiIO & PBD::debug_bits) {
- DEBUG_STR_DECL(a);
- DEBUG_STR_APPEND(a, string_compose ("midibuffer %1 push jack event @ %2 sz %3 ", this, ev.time, ev.size));
- for (size_t i=0; i < ev.size; ++i) {
- DEBUG_STR_APPEND(a,hex);
- DEBUG_STR_APPEND(a,"0x");
- DEBUG_STR_APPEND(a,(int)ev.buffer[i]);
- DEBUG_STR_APPEND(a,' ');
- }
- DEBUG_STR_APPEND(a,'\n');
- DEBUG_TRACE (DEBUG::MidiIO, DEBUG_STR(a).str());
- }
-#endif
-
- uint8_t* const write_loc = _data + _size;
- *((TimeType*)write_loc) = ev.time;
- memcpy(write_loc + stamp_size, ev.buffer, ev.size);
-
- _size += stamp_size + ev.size;
- _silent = false;
-
- return true;
-}
-
-
/** Reserve space for a new event in the buffer.
*
* This call is for copying MIDI directly into the buffer, the data location