mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-23 17:30:17 +01:00
New attached structure ProjectSettings stores rate, snap-to, et al.
This commit is contained in:
@@ -125,14 +125,14 @@ Track::Holder TimeTrack::Copy( double t0, double t1, bool ) const
|
||||
|
||||
void TimeTrack::Clear(double t0, double t1)
|
||||
{
|
||||
auto sampleTime = 1.0 / GetActiveProject()->GetRate();
|
||||
auto sampleTime = 1.0 / ProjectSettings::Get( *GetActiveProject() ).GetRate();
|
||||
mEnvelope->CollapseRegion( t0, t1, sampleTime );
|
||||
}
|
||||
|
||||
void TimeTrack::Paste(double t, const Track * src)
|
||||
{
|
||||
bool bOk = src && src->TypeSwitch< bool >( [&] (const TimeTrack *tt) {
|
||||
auto sampleTime = 1.0 / GetActiveProject()->GetRate();
|
||||
auto sampleTime = 1.0 / ProjectSettings::Get( *GetActiveProject() ).GetRate();
|
||||
mEnvelope->PasteEnvelope
|
||||
(t, tt->mEnvelope.get(), sampleTime);
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user