Browse Source

Take fades into consideration when splitting regions.

Also, fix journalling bug in region splitting.
tags/non-daw-v1.1.0
Jonathan Moore Liles 17 years ago
parent
commit
37935df806
2 changed files with 13 additions and 5 deletions
  1. +9
    -0
      Timeline/Audio_Region.C
  2. +4
    -5
      Timeline/Loggable.C

+ 9
- 0
Timeline/Audio_Region.C View File

@@ -678,16 +678,25 @@ Audio_Region::handle ( int m )
{
Loggable::block_start();

nframes_t old_fade_in = _fade_in.length;
_fade_in.length = 256;

Audio_Region *copy = new Audio_Region( *this );

_fade_in.length = old_fade_in;

trim( RIGHT, X );
copy->trim( LEFT, X );

_fade_out.length = 256;

sequence()->add( copy );

log_end();

Loggable::block_end();

log_start();
}

return 0;


+ 4
- 5
Timeline/Loggable.C View File

@@ -601,6 +601,8 @@ Loggable::log_start ( void )
void
Loggable::log_end ( void )
{
ASSERT( _old_state, "Programming error: log_end() called before log_start()" );

if ( --_nest > 0 )
return;

@@ -617,11 +619,8 @@ Loggable::log_end ( void )
log_print( _old_state, new_state );
}

if ( new_state )
delete new_state;

if ( _old_state )
delete _old_state;
delete new_state;
delete _old_state;

_old_state = NULL;



Loading…
Cancel
Save