![]() |
Audacity 3.2.0
|
Holds project sample rate. More...
#include <ProjectRate.h>
Public Member Functions | |
| ProjectRate (AudacityProject &project) | |
| ProjectRate (const ProjectRate &)=delete | |
| ProjectRate & | operator= (const ProjectRate &)=delete |
| void | SetRate (double rate) |
| double | GetRate () const |
Public Member Functions inherited from ClientData::Base | |
| virtual | ~Base () |
Public Member Functions inherited from Observer::Publisher< double > | |
| Publisher (ExceptionPolicy *pPolicy=nullptr, Alloc a={}) | |
| Constructor supporting type-erased custom allocation/deletion. More... | |
| Publisher (Publisher &&)=default | |
| Publisher & | operator= (Publisher &&)=default |
| Subscription | Subscribe (Callback callback) |
| Connect a callback to the Publisher; later-connected are called earlier. More... | |
| Subscription | Subscribe (Object &obj, Return(Object::*callback)(Args...)) |
| Overload of Subscribe takes an object and pointer-to-member-function. More... | |
Static Public Member Functions | |
| static ProjectRate & | Get (AudacityProject &project) |
| static const ProjectRate & | Get (const AudacityProject &project) |
Private Attributes | |
| double | mRate |
Additional Inherited Members | |
Public Types inherited from Observer::Publisher< double > | |
| using | message_type = double |
| using | CallbackReturn = std::conditional_t< true, void, bool > |
| using | Callback = std::function< CallbackReturn(const double &) > |
| Type of functions that can be connected to the Publisher. More... | |
Static Public Attributes inherited from Observer::Publisher< double > | |
| static constexpr bool | notifies_all |
Protected Member Functions inherited from Observer::Publisher< double > | |
| CallbackReturn | Publish (const double &message) |
| Send a message to connected callbacks. More... | |
Holds project sample rate.
Definition at line 21 of file ProjectRate.h.
|
explicit |
Definition at line 38 of file ProjectRate.cpp.
References QualitySettings::DefaultSampleRate, audacity::BasicSettings::Flush(), gPrefs, mRate, Setting< T >::Read(), and Setting< T >::Write().
|
delete |
|
static |
Definition at line 28 of file ProjectRate.cpp.
Referenced by ExportCommand::Apply(), SetProjectCommand::Apply(), BenchmarkDialog::BenchmarkDialog(), DevicePrefs::Commit(), ContrastDialog::ContrastDialog(), ProjectAudioIO::DefaultOptionsFactory(), DefaultSpeedPlayOptions(), AudacityApplicationLogic::DoEffect(), anonymous_namespace{FileMenus.cpp}::DoExport(), anonymous_namespace{TrackMenus.cpp}::DoMixAndRender(), anonymous_namespace{EditMenus.cpp}::DoPasteNothingSelected(), audacity::cloud::audiocom::sync::MixdownUploader::ExportProject(), audacity::cloud::audiocom::ShareAudioDialog::ExportProject(), Get(), ProjectManager::GetEstimatedRecordingMinsLeftOnDisk(), anonymous_namespace{TimeTrack.cpp}::GetRate(), FormatterContext::GetSampleRate(), AUPImportFileHandle::Import(), ImportRaw(), anonymous_namespace{SelectMenus.cpp}::NearestZeroCrossing(), anonymous_namespace{WaveTrackMenuItems.cpp}::OnNewStereoTrack(), anonymous_namespace{WaveTrackMenuItems.cpp}::OnNewWaveTrack(), anonymous_namespace{TrackMenus.cpp}::OnResample(), anonymous_namespace{PluginMenus.cpp}::OnResetConfig(), anonymous_namespace{TimerRecordDialog.cpp}::OnTimerRecord(), SelectActions::Handler::OnZeroCrossing(), anonymous_namespace{ParsedNumericConverterFormatter.cpp}::ParsedNumericConverterFormatter::ParsedNumericConverterFormatter(), DevicePrefs::Populate(), NyquistBase::Process(), WaveTrack::ProjectNyquistFrequency(), SnapManager::Reinit(), SelectionBar::SelectionBar(), and anonymous_namespace{TimeSnapFunctions.cpp}::SnapToSamples().
|
static |
Definition at line 33 of file ProjectRate.cpp.
References Get(), and project.
| double ProjectRate::GetRate | ( | ) | const |
Definition at line 53 of file ProjectRate.cpp.
References mRate.
Referenced by ExportCommand::Apply(), ContrastDialog::ContrastDialog(), WaveTrackFactory::Create(), WaveTrackFactory::CreateMany(), ProjectAudioIO::DefaultOptionsFactory(), AudacityApplicationLogic::DoEffect(), anonymous_namespace{TrackMenus.cpp}::DoMixAndRender(), anonymous_namespace{EditMenus.cpp}::DoPasteNothingSelected(), ProjectManager::GetEstimatedRecordingMinsLeftOnDisk(), anonymous_namespace{TimeTrack.cpp}::GetRate(), FormatterContext::GetSampleRate(), ImportRaw(), anonymous_namespace{SelectMenus.cpp}::NearestZeroCrossing(), anonymous_namespace{WaveTrackMenuItems.cpp}::OnNewStereoTrack(), anonymous_namespace{WaveTrackMenuItems.cpp}::OnNewWaveTrack(), anonymous_namespace{TrackMenus.cpp}::OnResample(), BenchmarkDialog::OnRun(), SelectActions::Handler::OnZeroCrossing(), DevicePrefs::Populate(), NyquistBase::Process(), SnapManager::Reinit(), SelectionBar::SelectionBar(), and anonymous_namespace{TimeSnapFunctions.cpp}::SnapToSamples().
|
delete |
| void ProjectRate::SetRate | ( | double | rate | ) |
Definition at line 58 of file ProjectRate.cpp.
References mRate, and Observer::Publisher< double >::Publish().
Referenced by SetProjectCommand::Apply(), AUPImportFileHandle::Import(), and anonymous_namespace{PluginMenus.cpp}::OnResetConfig().
|
private |
Definition at line 37 of file ProjectRate.h.
Referenced by GetRate(), ProjectRate(), and SetRate().