13
0

API change for the start of making tempo mapping undoable

This commit is contained in:
Paul Davis 2023-08-06 13:39:48 -06:00
parent 0223be5312
commit e7c35cf601
2 changed files with 6 additions and 2 deletions

View File

@ -1387,7 +1387,7 @@ public:
bool bang_trigger_at(int32_t route_index, int32_t row_index);
bool unbang_trigger_at(int32_t route_index, int32_t row_index);
void globally_change_time_domain (Temporal::TimeDomain from, Temporal::TimeDomain to);
PBD::Command* globally_change_time_domain (Temporal::TimeDomain from, Temporal::TimeDomain to);
protected:
friend class AudioEngine;

View File

@ -299,9 +299,11 @@ Session::any_duration_to_samples (samplepos_t position, AnyTime const & duration
return duration.samples;
}
void
PBD::Command*
Session::globally_change_time_domain (Temporal::TimeDomain from, Temporal::TimeDomain to)
{
PBD::Command* undo_command = new Temporal::TimeDomainCommand (from, to);
{
std::shared_ptr<RouteList const> rl (routes.reader());
@ -312,4 +314,6 @@ Session::globally_change_time_domain (Temporal::TimeDomain from, Temporal::TimeD
_playlists->globally_change_time_domain (from, to);
_locations->globally_change_time_domain (from, to);
return undo_command;
}