diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2018-10-06 11:13:03 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2018-10-06 11:13:03 +0200 |
commit | 0e2db9214ff3d6cbe4388224f405bc5d67d6a8d3 (patch) | |
tree | 8c10a15879a346b2697e95f5ea3d841f797e1f05 /src/project.cc | |
parent | 5584b748a7e75a1f8b582ba9227dc08b2b2c5649 (diff) |
Add (automatic) samplerate detection to the project.
Diffstat (limited to 'src/project.cc')
-rw-r--r-- | src/project.cc | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/project.cc b/src/project.cc index 5cadcd4..e592439 100644 --- a/src/project.cc +++ b/src/project.cc @@ -501,6 +501,24 @@ void Project::setProjectDescription(const QString& description) } } +double Project::getProjectSamplerate() const +{ + return samplerate; +} + +void Project::setProjectSamplerate(double samplerate) +{ + if(this->samplerate == samplerate) + { + return; + } + + { + Project::RAIIBulkUpdate bulkUpdate(*this); + this->samplerate = samplerate; + } +} + Instrument& Project::getInstrument(int id) { for(auto& instrument : instruments) |