nonlib: Fix bugs in JACK::Port.

This commit is contained in:
Jonathan Moore Liles 2013-06-26 23:48:08 -07:00
parent fd1207b75e
commit a59dad4204
1 changed files with 4 additions and 3 deletions

View File

@ -126,7 +126,7 @@ namespace JACK
if ( type() == rhs.type() ) if ( type() == rhs.type() )
return strcmp( name(), rhs.name() ); return strcmp( name(), rhs.name() );
else else
return type() == Port::Input; return direction() == Port::Input;
} }
@ -171,7 +171,8 @@ namespace JACK
{ {
_port = jack_port_register( _client->jack_client(), _name, _port = jack_port_register( _client->jack_client(), _name,
_type == Audio ? JACK_DEFAULT_AUDIO_TYPE : JACK_DEFAULT_MIDI_TYPE, _type == Audio ? JACK_DEFAULT_AUDIO_TYPE : JACK_DEFAULT_MIDI_TYPE,
_direction == Output ? JackPortIsOutput : JackPortIsInput | _terminal ? JackPortIsTerminal : 0, ( _direction == Output ? JackPortIsOutput : JackPortIsInput ) |
( _terminal ? JackPortIsTerminal : 0 ),
0 ); 0 );
if ( ! _port ) if ( ! _port )
@ -278,7 +279,7 @@ namespace JACK
const char *dst; const char *dst;
const char *name = jack_port_name( _port ); const char *name = jack_port_name( _port );
if ( type() == Output ) if ( direction() == Output )
{ {
src = name; src = name;
dst = *port_name; dst = *port_name;