1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-04-03 21:07:36 +02:00

New attached structure ProjectSettings stores rate, snap-to, et al.

This commit is contained in:
Paul Licameli
2019-05-27 10:17:16 -04:00
parent 327845b0ee
commit dd10e00a2d
40 changed files with 371 additions and 228 deletions

View File

@@ -93,13 +93,16 @@ WaveTrack::Holder TrackFactory::NewWaveTrack(sampleFormat format, double rate)
WaveTrack::WaveTrack(const std::shared_ptr<DirManager> &projDirManager, sampleFormat format, double rate) :
PlayableTrack(projDirManager)
{
if (format == (sampleFormat)0)
{
format = GetActiveProject()->GetDefaultFormat();
}
if (rate == 0)
{
rate = GetActiveProject()->GetRate();
const auto settings = ProjectSettings::Get( *GetActiveProject() );
if (format == (sampleFormat)0)
{
format = settings.GetDefaultFormat();
}
if (rate == 0)
{
rate = settings.GetRate();
}
}
// Force creation always: