summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gtk2_ardour/io_selector.cc22
-rw-r--r--libs/ardour/buffer_set.cc2
-rw-r--r--libs/ardour/midi_model.cc4
-rw-r--r--libs/ardour/midi_port.cc2
4 files changed, 15 insertions, 15 deletions
diff --git a/gtk2_ardour/io_selector.cc b/gtk2_ardour/io_selector.cc
index 1708c9036e..b0b1a5f9b7 100644
--- a/gtk2_ardour/io_selector.cc
+++ b/gtk2_ardour/io_selector.cc
@@ -34,7 +34,7 @@
IOSelector::IOSelector (ARDOUR::Session& session, boost::shared_ptr<ARDOUR::IO> io, bool offer_inputs)
: PortMatrix (
- session, io->default_type(), offer_inputs,
+ session, io->default_type(), !offer_inputs,
PortGroupList::Mask (PortGroupList::BUSS | PortGroupList::SYSTEM | PortGroupList::OTHER)
),
_io (io)
@@ -69,13 +69,13 @@ void
IOSelector::set_state (int r, std::string const & p, bool s)
{
if (s) {
- if (_offer_inputs) {
+ if (!_offer_inputs) {
_io->connect_input (_io->input(r), p, 0);
} else {
_io->connect_output (_io->output(r), p, 0);
}
} else {
- if (_offer_inputs) {
+ if (!_offer_inputs) {
_io->disconnect_input (_io->input(r), p, 0);
} else {
_io->disconnect_output (_io->output(r), p, 0);
@@ -89,9 +89,9 @@ IOSelector::get_state (int r, std::string const & p) const
vector<string> connections;
if (_offer_inputs) {
- _io->input(r)->get_connections (connections);
- } else {
_io->output(r)->get_connections (connections);
+ } else {
+ _io->input(r)->get_connections (connections);
}
int k = 0;
@@ -110,7 +110,7 @@ IOSelector::get_state (int r, std::string const & p) const
uint32_t
IOSelector::n_rows () const
{
- if (_offer_inputs) {
+ if (!_offer_inputs) {
return _io->inputs().num_ports (_io->default_type());
} else {
return _io->outputs().num_ports (_io->default_type());
@@ -120,7 +120,7 @@ IOSelector::n_rows () const
uint32_t
IOSelector::maximum_rows () const
{
- if (_offer_inputs) {
+ if (!_offer_inputs) {
return _io->input_maximum ().get (_io->default_type());
} else {
return _io->output_maximum ().get (_io->default_type());
@@ -131,7 +131,7 @@ IOSelector::maximum_rows () const
uint32_t
IOSelector::minimum_rows () const
{
- if (_offer_inputs) {
+ if (!_offer_inputs) {
return _io->input_minimum ().get (_io->default_type());
} else {
return _io->output_minimum ().get (_io->default_type());
@@ -141,7 +141,7 @@ IOSelector::minimum_rows () const
std::string
IOSelector::row_name (int r) const
{
- if (_offer_inputs) {
+ if (!_offer_inputs) {
return _io->input(r)->name();
} else {
return _io->output(r)->name();
@@ -155,7 +155,7 @@ IOSelector::add_row ()
// The IO selector only works for single typed IOs
const ARDOUR::DataType t = _io->default_type ();
- if (_offer_inputs) {
+ if (!_offer_inputs) {
try {
_io->add_input_port ("", this);
@@ -186,7 +186,7 @@ IOSelector::remove_row (int r)
// The IO selector only works for single typed IOs
const ARDOUR::DataType t = _io->default_type ();
- if (_offer_inputs) {
+ if (!_offer_inputs) {
_io->remove_input_port (_io->input (r), this);
} else {
_io->remove_output_port (_io->output (r), this);
diff --git a/libs/ardour/buffer_set.cc b/libs/ardour/buffer_set.cc
index 280f70693b..65e9f8ac8f 100644
--- a/libs/ardour/buffer_set.cc
+++ b/libs/ardour/buffer_set.cc
@@ -107,7 +107,7 @@ BufferSet::ensure_buffers(DataType type, size_t num_buffers, size_t buffer_capac
// See MidiPort::MidiPort
// We probably need a map<DataType, size_t> parameter for capacity
if (type == DataType::MIDI)
- buffer_capacity *= 4;
+ buffer_capacity *= 8;
// The vector of buffers of the type we care about
BufferVec& bufs = _buffers[type];
diff --git a/libs/ardour/midi_model.cc b/libs/ardour/midi_model.cc
index bf92c4f341..5d327cd2d7 100644
--- a/libs/ardour/midi_model.cc
+++ b/libs/ardour/midi_model.cc
@@ -180,9 +180,9 @@ const MidiModel::const_iterator& MidiModel::const_iterator::operator++()
assert(_event->buffer() && _event->buffer()[0] != '\0');
- /*cerr << "const_iterator::operator++: _event type:" << hex << "0x" << int(_event->type())
+ cerr << "const_iterator::operator++: _event type:" << hex << "0x" << int(_event->type())
<< " buffer: 0x" << int(_event->buffer()[0]) << " 0x" << int(_event->buffer()[1])
- << " 0x" << int(_event->buffer()[2]) << endl;*/
+ << " 0x" << int(_event->buffer()[2]) << endl;
if (! (_event->is_note() || _event->is_cc() || _event->is_pgm_change() || _event->is_pitch_bender() || _event->is_channel_aftertouch()) ) {
cerr << "FAILED event buffer: " << hex << int(_event->buffer()[0]) << int(_event->buffer()[1]) << int(_event->buffer()[2]) << endl;
diff --git a/libs/ardour/midi_port.cc b/libs/ardour/midi_port.cc
index 6b097930f1..14f88f2ad5 100644
--- a/libs/ardour/midi_port.cc
+++ b/libs/ardour/midi_port.cc
@@ -33,7 +33,7 @@ MidiPort::MidiPort (const std::string& name, Flags flags, bool external, nframes
{
// FIXME: size kludge (see BufferSet::ensure_buffers)
// Jack needs to tell us this
- _buffer = new MidiBuffer (capacity * 4);
+ _buffer = new MidiBuffer (capacity * 8);
if (external) {
/* external ports use the same buffer for the jack port (_ext_port)