Take fades into consideration when splitting regions.
Also, fix journalling bug in region splitting.
This commit is contained in:
parent
840d08aed9
commit
37935df806
|
@ -678,16 +678,25 @@ Audio_Region::handle ( int m )
|
||||||
{
|
{
|
||||||
Loggable::block_start();
|
Loggable::block_start();
|
||||||
|
|
||||||
|
nframes_t old_fade_in = _fade_in.length;
|
||||||
|
_fade_in.length = 256;
|
||||||
|
|
||||||
Audio_Region *copy = new Audio_Region( *this );
|
Audio_Region *copy = new Audio_Region( *this );
|
||||||
|
|
||||||
|
_fade_in.length = old_fade_in;
|
||||||
|
|
||||||
trim( RIGHT, X );
|
trim( RIGHT, X );
|
||||||
copy->trim( LEFT, X );
|
copy->trim( LEFT, X );
|
||||||
|
|
||||||
|
_fade_out.length = 256;
|
||||||
|
|
||||||
sequence()->add( copy );
|
sequence()->add( copy );
|
||||||
|
|
||||||
log_end();
|
log_end();
|
||||||
|
|
||||||
Loggable::block_end();
|
Loggable::block_end();
|
||||||
|
|
||||||
|
log_start();
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -601,6 +601,8 @@ Loggable::log_start ( void )
|
||||||
void
|
void
|
||||||
Loggable::log_end ( void )
|
Loggable::log_end ( void )
|
||||||
{
|
{
|
||||||
|
ASSERT( _old_state, "Programming error: log_end() called before log_start()" );
|
||||||
|
|
||||||
if ( --_nest > 0 )
|
if ( --_nest > 0 )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -617,11 +619,8 @@ Loggable::log_end ( void )
|
||||||
log_print( _old_state, new_state );
|
log_print( _old_state, new_state );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( new_state )
|
delete new_state;
|
||||||
delete new_state;
|
delete _old_state;
|
||||||
|
|
||||||
if ( _old_state )
|
|
||||||
delete _old_state;
|
|
||||||
|
|
||||||
_old_state = NULL;
|
_old_state = NULL;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue