Audacity  2.2.2
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
TrackFactory Class Reference

Used to create a WaveTrack, or a LabelTrack.. Implementation of the functions of this class are dispersed through the different Track classes. More...

#include <Track.h>

Public Member Functions

std::unique_ptr< WaveTrackDuplicateWaveTrack (const WaveTrack &orig)
 
std::unique_ptr< WaveTrackNewWaveTrack (sampleFormat format=(sampleFormat) 0, double rate=0)
 
std::unique_ptr< LabelTrackNewLabelTrack ()
 
std::unique_ptr< TimeTrackNewTimeTrack ()
 

Private Member Functions

 TrackFactory (const std::shared_ptr< DirManager > &dirManager, const ZoomInfo *zoomInfo)
 

Private Attributes

const std::shared_ptr< DirManagermDirManager
 
const ZoomInfo *const mZoomInfo
 

Friends

class AudacityProject
 
class BenchmarkDialog
 

Detailed Description

Used to create a WaveTrack, or a LabelTrack.. Implementation of the functions of this class are dispersed through the different Track classes.

Definition at line 863 of file Track.h.

Constructor & Destructor Documentation

TrackFactory::TrackFactory ( const std::shared_ptr< DirManager > &  dirManager,
const ZoomInfo zoomInfo 
)
inlineprivate

Definition at line 866 of file Track.h.

866  :
867  mDirManager(dirManager)
868  , mZoomInfo(zoomInfo)
869  {
870  }
const std::shared_ptr< DirManager > mDirManager
Definition: Track.h:872
const ZoomInfo *const mZoomInfo
Definition: Track.h:873

Member Function Documentation

WaveTrack::Holder TrackFactory::DuplicateWaveTrack ( const WaveTrack orig)

Definition at line 71 of file WaveTrack.cpp.

References WaveTrack::Duplicate().

72 {
73  return std::unique_ptr<WaveTrack>
74  { static_cast<WaveTrack*>(orig.Duplicate().release()) };
75 }
Track::Holder Duplicate() const override
Definition: WaveTrack.cpp:393
A Track that contains audio waveform data.
Definition: WaveTrack.h:60
LabelTrack::Holder TrackFactory::NewLabelTrack ( )
std::unique_ptr< TimeTrack > TrackFactory::NewTimeTrack ( )

Definition at line 35 of file TimeTrack.cpp.

References mDirManager, and mZoomInfo.

Referenced by TranscriptionToolBar::PlayAtSpeed().

36 {
37  return std::make_unique<TimeTrack>(mDirManager, mZoomInfo);
38 }
const std::shared_ptr< DirManager > mDirManager
Definition: Track.h:872
const ZoomInfo *const mZoomInfo
Definition: Track.h:873
WaveTrack::Holder TrackFactory::NewWaveTrack ( sampleFormat  format = (sampleFormat)0,
double  rate = 0 
)

Definition at line 78 of file WaveTrack.cpp.

References mDirManager, and safenew.

Referenced by PCMImportFileHandle::Import(), ImportRaw(), MixAndRender(), EffectStereoToMono::Process(), Generator::Process(), EffectPaulstretch::ProcessOne(), EffectChangeSpeed::ProcessOne(), NyquistEffect::ProcessOne(), EffectEqualization::ProcessOne(), EffectNoiseReduction::Worker::ProcessOne(), Effect::ProcessTrack(), and WaveTrack::SyncLockAdjust().

79 {
80  return std::unique_ptr<WaveTrack>
81  { safenew WaveTrack(mDirManager, format, rate) };
82 }
const std::shared_ptr< DirManager > mDirManager
Definition: Track.h:872
#define safenew
Definition: Audacity.h:230
int format
Definition: ExportPCM.cpp:56
A Track that contains audio waveform data.
Definition: WaveTrack.h:60

Friends And Related Function Documentation

friend class AudacityProject
friend

Definition at line 874 of file Track.h.

friend class BenchmarkDialog
friend

Definition at line 875 of file Track.h.

Member Data Documentation

const std::shared_ptr<DirManager> TrackFactory::mDirManager
private

Definition at line 872 of file Track.h.

Referenced by NewLabelTrack(), NewTimeTrack(), and NewWaveTrack().

const ZoomInfo* const TrackFactory::mZoomInfo
private

Definition at line 873 of file Track.h.

Referenced by NewTimeTrack().


The documentation for this class was generated from the following files: