fix up what freeze does with fader settings, gain & pan automation; unfreeze too

git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@4088 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2008-11-03 17:10:00 +00:00
parent bb520383a3
commit ab795db913
3 changed files with 20 additions and 2 deletions

View File

@ -129,6 +129,9 @@ class Track : public Route
vector<FreezeRecordInsertInfo*> insert_info;
bool have_mementos;
FreezeState state;
gain_t gain;
AutoState gain_automation_state;
AutoState pan_automation_state;
};
struct RecEnableControllable : public PBD::Controllable {

View File

@ -848,6 +848,10 @@ AudioTrack::freeze (InterThreadInfo& itt)
}
}
_freeze_record.gain = _gain;
_freeze_record.gain_automation_state = _gain_automation_curve.automation_state();
_freeze_record.pan_automation_state = _panner->automation_state();
new_playlist = PlaylistFactory::create (_session, new_playlist_name, false);
region_name = new_playlist_name;
@ -866,6 +870,12 @@ AudioTrack::freeze (InterThreadInfo& itt)
diskstream->use_playlist (boost::dynamic_pointer_cast<AudioPlaylist>(new_playlist));
diskstream->set_record_enabled (false);
/* reset stuff that has already been accounted for in the freeze process */
set_gain (1.0, this);
_gain_automation_curve.set_automation_state (Off);
_panner->set_automation_state (Off);
_freeze_record.state = Frozen;
FreezeChange(); /* EMIT SIGNAL */
}
@ -896,6 +906,9 @@ AudioTrack::unfreeze ()
}
_freeze_record.playlist.reset ();
set_gain (_freeze_record.gain, this);
_gain_automation_curve.set_automation_state (_freeze_record.gain_automation_state);
_panner->set_automation_state (_freeze_record.pan_automation_state);
}
_freeze_record.state = UnFrozen;

View File

@ -209,7 +209,8 @@ Crossfade::initialize ()
_fade_out.freeze ();
_fade_out.clear ();
#ifdef EQUAL_POWER_MINUS_3DB
#define EQUAL_POWER_MINUS_3DB
#ifdef EQUAL_POWER_MINUS_3DB
_fade_out.add ((_length * 0.000000), 1.000000);
_fade_out.add ((_length * 0.166667), 0.948859);
@ -235,7 +236,8 @@ Crossfade::initialize ()
_fade_in.freeze ();
_fade_in.clear ();
#ifdef EQUAL_POWER_MINUS_3DB
#define EQUAL_POWER_MINUS_3DB
#ifdef EQUAL_POWER_MINUS_3DB
_fade_in.add ((_length * 0.000000), 0.000000);
_fade_in.add ((_length * 0.166667), 0.282192);