mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-17 04:06:26 +01:00
Arbitrarily increase MIDI process buffer size to avoid overruns with very dense data.
git-svn-id: svn://localhost/ardour2/branches/3.0@3389 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
8a97a89f3e
commit
f360ef94da
3 changed files with 13 additions and 2 deletions
|
|
@ -103,6 +103,12 @@ BufferSet::ensure_buffers(DataType type, size_t num_buffers, size_t buffer_capac
|
||||||
if (num_buffers == 0)
|
if (num_buffers == 0)
|
||||||
return;
|
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
|
// The vector of buffers of the type we care about
|
||||||
BufferVec& bufs = _buffers[type];
|
BufferVec& bufs = _buffers[type];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -649,7 +649,10 @@ MidiDiskstream::set_pending_overwrite (bool yn)
|
||||||
int
|
int
|
||||||
MidiDiskstream::overwrite_existing_buffers ()
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,9 @@ MidiPort::MidiPort (const std::string& name, Flags flags, bool external, nframes
|
||||||
, BaseMidiPort (name, flags)
|
, BaseMidiPort (name, flags)
|
||||||
, PortFacade (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) {
|
if (external) {
|
||||||
/* external ports use the same buffer for the jack port (_ext_port)
|
/* external ports use the same buffer for the jack port (_ext_port)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue