libmidi++: fix a bunch of issues with previous commit
git-svn-id: svn://localhost/ardour2/branches/3.0@12065 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
1660f00ff3
commit
6ca4b88d5a
|
@ -141,7 +141,7 @@ class PortBase {
|
||||||
Flags _flags;
|
Flags _flags;
|
||||||
bool _centrally_parsed;
|
bool _centrally_parsed;
|
||||||
|
|
||||||
virtual void init (std::string const &, Flags);
|
void init (std::string const &, Flags);
|
||||||
};
|
};
|
||||||
|
|
||||||
struct PortSet {
|
struct PortSet {
|
||||||
|
|
|
@ -71,17 +71,13 @@ Port::Port (const XMLNode& node, jack_client_t* jack_client)
|
||||||
assert (jack_client);
|
assert (jack_client);
|
||||||
|
|
||||||
Descriptor desc (node);
|
Descriptor desc (node);
|
||||||
|
|
||||||
init (desc.tag, desc.flags);
|
init (desc.tag, desc.flags);
|
||||||
|
|
||||||
set_state (node);
|
set_state (node);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Port::init (string const & name, Flags flags)
|
Port::init (string const & name, Flags flags)
|
||||||
{
|
{
|
||||||
PortBase::init (name, flags);
|
|
||||||
|
|
||||||
if (!create_port ()) {
|
if (!create_port ()) {
|
||||||
_ok = true;
|
_ok = true;
|
||||||
}
|
}
|
||||||
|
@ -250,8 +246,6 @@ Port::write(byte * msg, size_t msglen, timestamp_t timestamp)
|
||||||
|
|
||||||
ret = msglen;
|
ret = msglen;
|
||||||
|
|
||||||
usleep (5000);
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
// XXX This had to be temporarily commented out to make export work again
|
// XXX This had to be temporarily commented out to make export work again
|
||||||
|
@ -306,7 +300,7 @@ Port::flush (void* jack_port_buffer)
|
||||||
output_fifo.get_read_vector (&vec);
|
output_fifo.get_read_vector (&vec);
|
||||||
|
|
||||||
if (vec.len[0] + vec.len[1]) {
|
if (vec.len[0] + vec.len[1]) {
|
||||||
cerr << "Flush " << vec.len[0] + vec.len[1] << " events from non-process FIFO\n";
|
// cerr << "Flush " << vec.len[0] + vec.len[1] << " events from non-process FIFO\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (vec.len[0]) {
|
if (vec.len[0]) {
|
||||||
|
@ -410,9 +404,13 @@ Port::set_state (const XMLNode& node)
|
||||||
{
|
{
|
||||||
const XMLProperty* prop;
|
const XMLProperty* prop;
|
||||||
|
|
||||||
|
if ((prop = node.property ("tag")) == 0 || prop->value() != _tagname) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
PortBase::set_state (node);
|
PortBase::set_state (node);
|
||||||
|
|
||||||
if ((prop = node.property ("connections")) != 0 && _jack_port) {
|
if ((prop = node.property ("connections")) != 0) {
|
||||||
_connections = prop->value ();
|
_connections = prop->value ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,12 +52,11 @@ PortBase::PortBase (string const & name, Flags flags)
|
||||||
PortBase::PortBase (const XMLNode& node)
|
PortBase::PortBase (const XMLNode& node)
|
||||||
: _centrally_parsed (true)
|
: _centrally_parsed (true)
|
||||||
{
|
{
|
||||||
|
|
||||||
Descriptor desc (node);
|
Descriptor desc (node);
|
||||||
|
|
||||||
init (desc.tag, desc.flags);
|
init (desc.tag, desc.flags);
|
||||||
|
|
||||||
set_state (node);
|
/* derived class must call ::set_state() */
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in New Issue
Block a user