13
0

*fix the bugfix: Input and Output Ports exchanged in Track/Bus inspector

*increased buffer sizes to get rid of overruns (PitchBender still doesnt work though....)


git-svn-id: svn://localhost/ardour2/branches/3.0@3403 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Hans Baier 2008-05-23 02:13:31 +00:00
parent 1401a52764
commit 8c743c2c0c
4 changed files with 15 additions and 15 deletions

View File

@ -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);

View File

@ -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];

View File

@ -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;

View File

@ -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)