diff options
-rw-r--r-- | libs/ardour/buffer_set.cc | 6 | ||||
-rw-r--r-- | libs/ardour/midi_diskstream.cc | 5 | ||||
-rw-r--r-- | libs/ardour/midi_port.cc | 4 |
3 files changed, 13 insertions, 2 deletions
diff --git a/libs/ardour/buffer_set.cc b/libs/ardour/buffer_set.cc index 3dc580caa2..280f70693b 100644 --- a/libs/ardour/buffer_set.cc +++ b/libs/ardour/buffer_set.cc @@ -103,6 +103,12 @@ BufferSet::ensure_buffers(DataType type, size_t num_buffers, size_t buffer_capac if (num_buffers == 0) return; + // FIXME: Kludge to make MIDI buffers larger (size is bytes, not frames) + // See MidiPort::MidiPort + // We probably need a map<DataType, size_t> parameter for capacity + if (type == DataType::MIDI) + buffer_capacity *= 4; + // The vector of buffers of the type we care about BufferVec& bufs = _buffers[type]; diff --git a/libs/ardour/midi_diskstream.cc b/libs/ardour/midi_diskstream.cc index 84fe21ce35..5b4716d51e 100644 --- a/libs/ardour/midi_diskstream.cc +++ b/libs/ardour/midi_diskstream.cc @@ -649,7 +649,10 @@ MidiDiskstream::set_pending_overwrite (bool yn) int MidiDiskstream::overwrite_existing_buffers () { - //cerr << "MDS: overwrite_existing_buffers() (does nothing)" << endl; + read(overwrite_frame, disk_io_chunk_frames, false); + overwrite_queued = false; + pending_overwrite = false; + return 0; } diff --git a/libs/ardour/midi_port.cc b/libs/ardour/midi_port.cc index fc48218efa..6b097930f1 100644 --- a/libs/ardour/midi_port.cc +++ b/libs/ardour/midi_port.cc @@ -31,7 +31,9 @@ MidiPort::MidiPort (const std::string& name, Flags flags, bool external, nframes , BaseMidiPort (name, flags) , PortFacade (name, flags) { - _buffer = new MidiBuffer (capacity); + // FIXME: size kludge (see BufferSet::ensure_buffers) + // Jack needs to tell us this + _buffer = new MidiBuffer (capacity * 4); if (external) { /* external ports use the same buffer for the jack port (_ext_port) |