Timeline: Mark ports as Terminal.
This commit is contained in:
parent
1a9741cb7f
commit
a958276b06
|
@ -39,6 +39,7 @@ namespace JACK
|
|||
|
||||
Port::Port ( const Port &rhs )
|
||||
{
|
||||
_terminal = rhs._terminal;
|
||||
_freezer = rhs._freezer;
|
||||
_client = rhs._client;
|
||||
_port = rhs._port;
|
||||
|
@ -52,6 +53,7 @@ namespace JACK
|
|||
/* nframes is the number of frames to buffer */
|
||||
Port::Port ( JACK::Client *client, jack_port_t *port )
|
||||
{
|
||||
_terminal = 0;
|
||||
_freezer = NULL;
|
||||
_client = client;
|
||||
_port = port;
|
||||
|
@ -66,6 +68,7 @@ namespace JACK
|
|||
|
||||
Port::Port ( JACK::Client *client, const char *name, direction_e dir, type_e type )
|
||||
{
|
||||
_terminal = 0;
|
||||
_name = NULL;
|
||||
_freezer = NULL;
|
||||
_client = client;
|
||||
|
@ -77,6 +80,7 @@ namespace JACK
|
|||
|
||||
Port::Port ( JACK::Client *client, direction_e dir, type_e type, const char *base, int n, const char *subtype )
|
||||
{
|
||||
_terminal = 0;
|
||||
_name = NULL;
|
||||
_freezer = NULL;
|
||||
_client = client;
|
||||
|
@ -88,6 +92,7 @@ namespace JACK
|
|||
|
||||
Port::Port ( JACK::Client *client, direction_e dir, type_e type, int n, const char *subtype )
|
||||
{
|
||||
_terminal = 0;
|
||||
_name = NULL;
|
||||
_freezer = NULL;
|
||||
_client = client;
|
||||
|
@ -166,7 +171,7 @@ namespace JACK
|
|||
{
|
||||
_port = jack_port_register( _client->jack_client(), _name,
|
||||
_type == Audio ? JACK_DEFAULT_AUDIO_TYPE : JACK_DEFAULT_MIDI_TYPE,
|
||||
_direction == Output ? JackPortIsOutput : JackPortIsInput,
|
||||
_direction == Output ? JackPortIsOutput : JackPortIsInput | _terminal ? JackPortIsTerminal : 0,
|
||||
0 );
|
||||
|
||||
if ( ! _port )
|
||||
|
|
|
@ -69,6 +69,7 @@ namespace JACK
|
|||
nframes_t latency ( void ) const;
|
||||
void latency ( nframes_t frames );
|
||||
|
||||
void terminal ( bool b ) { _terminal = b; }
|
||||
bool activate ( void );
|
||||
void shutdown ( void );
|
||||
void write ( sample_t *buf, nframes_t nframes );
|
||||
|
@ -89,6 +90,7 @@ namespace JACK
|
|||
|
||||
direction_e _direction;
|
||||
type_e _type;
|
||||
bool _terminal;
|
||||
|
||||
bool activate ( const char *name, direction_e dir );
|
||||
|
||||
|
|
|
@ -172,6 +172,7 @@ Control_Sequence::update_port_name ( void )
|
|||
if ( ! _output )
|
||||
{
|
||||
_output = new JACK::Port( engine, JACK::Port::Output, JACK::Port::Audio, track()->name(), track()->ncontrols(), "cv" );
|
||||
_output->terminal( true );
|
||||
needs_activation = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -88,6 +88,8 @@ Track::configure_outputs ( int n )
|
|||
{
|
||||
JACK::Port p( engine, JACK::Port::Output, JACK::Port::Audio, name(), i );
|
||||
|
||||
p.terminal(true);
|
||||
|
||||
if ( !p.activate() )
|
||||
{
|
||||
FATAL( "could not created output port!");
|
||||
|
@ -140,6 +142,8 @@ Track::configure_inputs ( int n )
|
|||
for ( int i = on; i < n; ++i )
|
||||
{
|
||||
JACK::Port p( engine, JACK::Port::Input, JACK::Port::Audio, name(), i );
|
||||
|
||||
p.terminal( true );
|
||||
|
||||
if ( !p.activate() )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue