Output silence when stopped.
This commit is contained in:
parent
7c516615d8
commit
7793863d46
|
@ -127,10 +127,6 @@ Engine::process ( nframes_t nframes )
|
|||
{
|
||||
transport->poll();
|
||||
|
||||
if ( ! transport->rolling )
|
||||
/* FIXME: fill all ports with silence */
|
||||
return 0;
|
||||
|
||||
if ( ! trylock() )
|
||||
{
|
||||
/* the data structures we need to access here (tracks and
|
||||
|
@ -141,6 +137,11 @@ Engine::process ( nframes_t nframes )
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* if ( ! transport->rolling ) */
|
||||
/* timeline->silence( nframes ); */
|
||||
/* return 0; */
|
||||
|
||||
|
||||
/* handle chicken/egg problem */
|
||||
if ( timeline )
|
||||
/* this will initiate the process() call graph for the various
|
||||
|
|
|
@ -122,3 +122,9 @@ Port::buffer ( nframes_t nframes )
|
|||
{
|
||||
return jack_port_get_buffer( _port, nframes );
|
||||
}
|
||||
|
||||
void
|
||||
Port::silence ( nframes_t nframes )
|
||||
{
|
||||
memset( buffer( nframes ), 0, nframes * sizeof( sample_t ) );
|
||||
}
|
||||
|
|
|
@ -62,5 +62,5 @@ public:
|
|||
void write ( sample_t *buf, nframes_t nframes );
|
||||
void read ( sample_t *buf, nframes_t nframes );
|
||||
void *buffer ( nframes_t nframes );
|
||||
|
||||
void silence ( nframes_t nframes );
|
||||
};
|
||||
|
|
|
@ -645,6 +645,22 @@ Track::configure_inputs ( int n )
|
|||
nframes_t
|
||||
Track::process ( nframes_t nframes )
|
||||
{
|
||||
|
||||
if ( ! transport->rolling )
|
||||
{
|
||||
for ( int i = output.size(); i--; )
|
||||
output[ i ].silence( nframes );
|
||||
|
||||
for ( int i = input.size(); i--; )
|
||||
input[ i ].silence( nframes );
|
||||
|
||||
/* FIXME: is this really the right thing to do for control ports? */
|
||||
for ( int i = control_out.size(); i--; )
|
||||
control_out[ i ]->silence( nframes );
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
for ( int i = control->children(); i--; )
|
||||
((Control_Sequence*)control->child( i ))->process( nframes );
|
||||
|
||||
|
|
Loading…
Reference in New Issue