Audacity 3.2.0
|
Used to create or clone a WaveTrack, with appropriate context from the project that will own the track. More...
#include <WaveTrack.h>
Public Member Functions | |
WaveTrackFactory (const ProjectRate &rate, const SampleBlockFactoryPtr &pFactory) | |
WaveTrackFactory (const WaveTrackFactory &)=delete | |
WaveTrackFactory & | operator= (const WaveTrackFactory &)=delete |
const SampleBlockFactoryPtr & | GetSampleBlockFactory () const |
std::shared_ptr< WaveTrack > | Create () |
Creates an unnamed empty WaveTrack with default sample format and default rate. More... | |
std::shared_ptr< WaveTrack > | Create (sampleFormat format, double rate) |
Creates an unnamed empty WaveTrack with custom sample format and custom rate. More... | |
WaveTrack::Holder | Create (size_t nChannels) |
Creates a new track with project's default rate and format and the given number of channels. More... | |
TrackListHolder | CreateMany (size_t nChannels) |
Creates tracks with project's default rate and format and the given number of channels. More... | |
WaveTrack::Holder | Create (size_t nChannels, sampleFormat format, double rate) |
Creates a new track with specified format and rate and number of channels. More... | |
TrackListHolder | CreateMany (size_t nChannels, sampleFormat format, double rate) |
Creates tracks with specified format and rate and number of channels. More... | |
WaveTrack::Holder | Create (size_t nChannels, const WaveTrack &proto) |
Creates an empty copy of proto with the specified number of channels. More... | |
Public Member Functions inherited from ClientData::Base | |
virtual | ~Base () |
Static Public Member Functions | |
static WaveTrackFactory & | Get (AudacityProject &project) |
static const WaveTrackFactory & | Get (const AudacityProject &project) |
static WaveTrackFactory & | Reset (AudacityProject &project) |
static void | Destroy (AudacityProject &project) |
Private Member Functions | |
std::shared_ptr< WaveTrack > | DoCreate (size_t nChannels, sampleFormat format, double rate) |
Private Attributes | |
const ProjectRate & | mRate |
SampleBlockFactoryPtr | mpFactory |
Used to create or clone a WaveTrack, with appropriate context from the project that will own the track.
Definition at line 869 of file WaveTrack.h.
|
inline |
Definition at line 878 of file WaveTrack.h.
|
delete |
std::shared_ptr< WaveTrack > WaveTrackFactory::Create | ( | ) |
Creates an unnamed empty WaveTrack with default sample format and default rate.
Definition at line 391 of file WaveTrack.cpp.
References Create(), ProjectRate::GetRate(), mRate, and QualitySettings::SampleFormatChoice().
Referenced by Create(), EffectBase::DoEffect(), MixAndRender(), and ImportUtils::NewWaveTrack().
std::shared_ptr< WaveTrack > WaveTrackFactory::Create | ( | sampleFormat | format, |
double | rate | ||
) |
Creates an unnamed empty WaveTrack with custom sample format and custom rate.
format | Desired sample format |
rate | Desired sample rate |
Definition at line 411 of file WaveTrack.cpp.
References DoCreate(), and anonymous_namespace{ExportPCM.cpp}::format.
WaveTrack::Holder WaveTrackFactory::Create | ( | size_t | nChannels | ) |
Creates a new track with project's default rate and format and the given number of channels.
nChannels > 0
nChannels <= 2
Definition at line 416 of file WaveTrack.cpp.
References Create(), ProjectRate::GetRate(), mRate, and QualitySettings::SampleFormatChoice().
WaveTrack::Holder WaveTrackFactory::Create | ( | size_t | nChannels, |
const WaveTrack & | proto | ||
) |
Creates an empty copy of proto
with the specified number of channels.
Definition at line 481 of file WaveTrack.cpp.
References WaveTrack::EmptyCopy(), and mpFactory.
WaveTrack::Holder WaveTrackFactory::Create | ( | size_t | nChannels, |
sampleFormat | format, | ||
double | rate | ||
) |
Creates a new track
with specified format
and rate
and number of channels.
nChannels > 0
nChannels <= 2
Definition at line 462 of file WaveTrack.cpp.
References CreateMany(), and anonymous_namespace{ExportPCM.cpp}::format.
TrackListHolder WaveTrackFactory::CreateMany | ( | size_t | nChannels | ) |
Creates tracks with project's default rate and format and the given number of channels.
Definition at line 423 of file WaveTrack.cpp.
References CreateMany(), ProjectRate::GetRate(), mRate, and QualitySettings::SampleFormatChoice().
Referenced by Create(), CreateMany(), ProjectAudioManager::DoRecord(), FFmpegImportFileHandle::Import(), OggImportFileHandle::Import(), PCMImportFileHandle::Import(), WavPackImportFileHandle::Import(), and ImportRaw().
TrackListHolder WaveTrackFactory::CreateMany | ( | size_t | nChannels, |
sampleFormat | format, | ||
double | rate | ||
) |
Creates tracks with specified format
and rate
and number of channels.
Definition at line 470 of file WaveTrack.cpp.
References DoCreate(), anonymous_namespace{ExportPCM.cpp}::format, and TrackList::Temporary().
|
static |
Definition at line 3393 of file WaveTrack.cpp.
Referenced by ProjectManager::OnCloseWindow().
|
private |
Definition at line 396 of file WaveTrack.cpp.
References anonymous_namespace{ExportPCM.cpp}::format, and mpFactory.
Referenced by Create(), and CreateMany().
|
static |
Definition at line 3376 of file WaveTrack.cpp.
Referenced by AudacityApplicationLogic::DoEffect(), anonymous_namespace{FileMenus.cpp}::DoImport(), ProjectFileManager::DoImport(), anonymous_namespace{TrackMenus.cpp}::DoMixAndRender(), ProjectAudioManager::DoRecord(), Get(), AUPImportFileHandle::HandleWaveTrack(), ProjectFileIO::LoadProject(), WaveTrack::New(), anonymous_namespace{EditMenus.cpp}::NotificationScope(), WaveTrackMenuTable::OnMergeStereo(), anonymous_namespace{WaveTrackMenuItems.cpp}::OnNewStereoTrack(), anonymous_namespace{WaveTrackMenuItems.cpp}::OnNewWaveTrack(), WaveTrack::PasteInto(), and audacity::cloud::audiocom::sync::anonymous_namespace{ResumedSnaphotUploadOperation.cpp}::ResumedSnaphotUploadOperation::UploadBlocks().
|
static |
Definition at line 3381 of file WaveTrack.cpp.
References Get(), and project.
|
inline |
Definition at line 888 of file WaveTrack.h.
Referenced by ProjectFileIO::LoadProject().
|
delete |
|
static |
Definition at line 3386 of file WaveTrack.cpp.
References key2, project, and TrackFactoryFactory.
Referenced by ProjectManager::ResetProjectToEmpty().
|
private |
Definition at line 944 of file WaveTrack.h.
Referenced by Create(), and DoCreate().
|
private |
Definition at line 943 of file WaveTrack.h.
Referenced by Create(), and CreateMany().