part-way through getting the audioengine changes to compile
[ardour.git] / libs / ardour / midi_buffer.cc
index b47c3ca1523ff4ee3b8a3f7e4d2ac853adbfe1f8..0b0e61000de81cbfd5af13e6e11c26fc3f570761 100644 (file)
@@ -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