Fix Mackie surface after port rework.
git-svn-id: svn://localhost/ardour2/branches/3.0@7388 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
ea23298f10
commit
28e3215afa
@ -16,6 +16,7 @@
|
|||||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <fcntl.h>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
@ -49,6 +50,7 @@
|
|||||||
#include "ardour/session.h"
|
#include "ardour/session.h"
|
||||||
#include "ardour/tempo.h"
|
#include "ardour/tempo.h"
|
||||||
#include "ardour/types.h"
|
#include "ardour/types.h"
|
||||||
|
#include "ardour/audioengine.h"
|
||||||
|
|
||||||
#include "mackie_control_protocol.h"
|
#include "mackie_control_protocol.h"
|
||||||
|
|
||||||
@ -577,11 +579,11 @@ void
|
|||||||
MackieControlProtocol::create_ports()
|
MackieControlProtocol::create_ports()
|
||||||
{
|
{
|
||||||
MIDI::Manager * mm = MIDI::Manager::instance();
|
MIDI::Manager * mm = MIDI::Manager::instance();
|
||||||
MIDI::Port * midi_port = mm->port (default_port_name);
|
MIDI::Port * midi_port = mm->add_port (new MIDI::Port (default_port_name, O_RDWR, session->engine().jack()));
|
||||||
|
|
||||||
// open main port
|
// open main port
|
||||||
|
|
||||||
if (midi_port == 0) {
|
if (!midi_port->ok()) {
|
||||||
ostringstream os;
|
ostringstream os;
|
||||||
os << string_compose (_("no MIDI port named \"%1\" exists - Mackie control disabled"), default_port_name);
|
os << string_compose (_("no MIDI port named \"%1\" exists - Mackie control disabled"), default_port_name);
|
||||||
error << os.str() << endmsg;
|
error << os.str() << endmsg;
|
||||||
@ -598,8 +600,8 @@ MackieControlProtocol::create_ports()
|
|||||||
for (int index = 1; index <= 9; ++index) {
|
for (int index = 1; index <= 9; ++index) {
|
||||||
ostringstream os;
|
ostringstream os;
|
||||||
os << ext_port_base << index;
|
os << ext_port_base << index;
|
||||||
MIDI::Port * midi_port = mm->port (os.str());
|
MIDI::Port * midi_port = mm->add_port (new MIDI::Port (os.str(), O_RDWR, session->engine().jack()));
|
||||||
if (midi_port != 0) {
|
if (midi_port->ok()) {
|
||||||
add_port (*midi_port, index);
|
add_port (*midi_port, index);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user