![]() |
Audacity 3.2.0
|
A Track that contains audio waveform data. More...
#include <WaveTrack.h>
Classes | |
class | AllClipsConstIterator |
class | AllClipsIterator |
class | IntervalData |
struct | Region |
Structure to hold region of a wavetrack and a comparison function for sortability. More... | |
Public Types | |
using | Regions = std::vector< Region > |
using | Holder = std::shared_ptr< WaveTrack > |
![]() | |
using | Attachments = SampleTrackAttachments |
![]() | |
enum class | LinkType : int { None = 0 , Group = 2 , Aligned } |
For two tracks describes the type of the linkage. More... | |
using | ChannelGroupAttachments = ClientData::Site< ChannelGroupData, ClientData::Cloneable<>, ClientData::DeepCopying > |
Hosting of objects attached by higher level code. More... | |
using | AttachedObjects = ::AttachedTrackObjects |
Alias for my base type. More... | |
using | IntervalData = TrackIntervalData |
using | Interval = TrackInterval |
using | Intervals = std::vector< Interval > |
using | ConstInterval = ConstTrackInterval |
using | ConstIntervals = std::vector< ConstInterval > |
using | Holder = std::shared_ptr< Track > |
template<typename R = void> | |
using | Continuation = std::function< R() > |
Type of arguments passed as optional second parameter to TypeSwitch() cases. More... | |
using | Fallthrough = Continuation<> |
Type of arguments passed as optional second parameter to TypeSwitch<void>() cases. More... | |
![]() | |
using | DataType = ClientData |
using | DataPointer = Pointer< ClientData > |
using | DataFactory = std::function< DataPointer(Host &) > |
Type of function from which RegisteredFactory is constructed; it builds attachments. More... | |
Public Member Functions | |
WaveTrack (const SampleBlockFactoryPtr &pFactory, sampleFormat format, double rate) | |
WaveTrack (const WaveTrack &orig, ProtectedCreationArg &&) | |
Copied only in WaveTrack::Clone() ! More... | |
void | Reinit (const WaveTrack &orig) |
virtual | ~WaveTrack () |
double | GetOffset () const override |
void | SetOffset (double o) override |
bool | LinkConsistencyFix (bool doFix, bool completeList) override |
Check consistency of channel groups, and maybe fix it. More... | |
double | GetStartTime () const override |
Get the time at which the first clip in the track starts. More... | |
double | GetEndTime () const override |
Get the time at which the last clip in the track ends, plus recorded stuff. More... | |
double | GetRate () const override |
void | SetRate (double newRate) |
float | GetGain () const |
void | SetGain (float newGain) |
float | GetPan () const |
void | SetPan (float newPan) |
float | GetChannelGain (int channel) const override |
Takes gain and pan into account. More... | |
int | GetWaveColorIndex () const |
void | SetWaveColorIndex (int colorIndex) |
sampleCount | GetPlaySamplesCount () const |
sampleCount | GetSequenceSamplesCount () const |
sampleFormat | GetSampleFormat () const override |
void | ConvertToSampleFormat (sampleFormat format, const std::function< void(size_t)> &progressReport={}) |
Track::Holder | Cut (double t0, double t1) override |
Holder | EmptyCopy (const SampleBlockFactoryPtr &pFactory={}, bool keepLink=true) const |
Track::Holder | Copy (double t0, double t1, bool forClipboard=true) const override |
Track::Holder | CopyNonconst (double t0, double t1) |
void | Clear (double t0, double t1) override |
void | Paste (double t0, const Track *src) override |
void | ClearAndPaste (double t0, double t1, const Track *src, bool preserve=true, bool merge=true, const TimeWarper *effectWarper=NULL) |
void | Silence (double t0, double t1) override |
void | InsertSilence (double t, double len) override |
void | SplitAt (double t) |
void | Split (double t0, double t1) |
void | ClearAndAddCutLine (double t0, double t1) |
Track::Holder | SplitCut (double t0, double t1) |
void | SplitDelete (double t0, double t1) |
void | Join (double t0, double t1) |
void | Disjoin (double t0, double t1) |
void | Trim (double t0, double t1) |
void | HandleClear (double t0, double t1, bool addCutLines, bool split) |
void | SyncLockAdjust (double oldT1, double newT1) override |
bool | IsEmpty (double t0, double t1) const |
Returns true if there are no WaveClips in the specified region. More... | |
bool | Append (constSamplePtr buffer, sampleFormat format, size_t len, unsigned int stride=1, sampleFormat effectiveFormat=widestSampleFormat) override |
void | Flush () override |
bool | Get (samplePtr buffer, sampleFormat format, sampleCount start, size_t len, fillFormat fill=fillZero, bool mayThrow=true, sampleCount *pNumWithinClips=nullptr) const override |
void | Set (constSamplePtr buffer, sampleFormat format, sampleCount start, size_t len, sampleFormat effectiveFormat=widestSampleFormat) |
sampleFormat | WidestEffectiveFormat () const override |
bool | HasTrivialEnvelope () const override |
void | GetEnvelopeValues (double *buffer, size_t bufferLen, double t0) const override |
Fetch envelope values corresponding to uniformly separated sample times starting at the given time. More... | |
std::pair< float, float > | GetMinMax (double t0, double t1, bool mayThrow=true) const |
float | GetRMS (double t0, double t1, bool mayThrow=true) const |
Sequence * | GetSequenceAtTime (double time) |
Envelope * | GetEnvelopeAtTime (double time) |
WaveClip * | GetClipAtTime (double time) |
sampleCount | GetBlockStart (sampleCount t) const override |
This returns a possibly large or negative value. More... | |
size_t | GetBestBlockSize (sampleCount t) const override |
This returns a nonnegative number of samples meant to size a memory buffer. More... | |
size_t | GetMaxBlockSize () const override |
This returns a nonnegative number of samples meant to size a memory buffer. More... | |
size_t | GetIdealBlockSize () |
bool | HandleXMLTag (const std::string_view &tag, const AttributesList &attrs) override |
void | HandleXMLEndTag (const std::string_view &tag) override |
XMLTagHandler * | HandleXMLChild (const std::string_view &tag) override |
void | WriteXML (XMLWriter &xmlFile) const override |
bool | GetErrorOpening () override |
bool | CloseLock () |
WaveClipHolders & | GetClips () |
const WaveClipConstHolders & | GetClips () const |
IteratorRange< AllClipsIterator > | GetAllClips () |
IteratorRange< AllClipsConstIterator > | GetAllClips () const |
WaveClip * | CreateClip (double offset=.0, const wxString &name=wxEmptyString) |
WaveClip * | NewestOrNewClip () |
Get access to the most recently added clip, or create a clip, if there is not already one. THIS IS NOT NECESSARILY RIGHTMOST. More... | |
WaveClip * | RightmostOrNewClip () |
Get access to the last (rightmost) clip, or create a clip, if there is not already one. More... | |
int | GetClipIndex (const WaveClip *clip) const |
WaveClip * | GetClipByIndex (int index) |
const WaveClip * | GetClipByIndex (int index) const |
int | GetNumClips () const |
WaveClipPointers | SortedClipArray () |
WaveClipConstPointers | SortedClipArray () const |
bool | CanOffsetClips (const std::vector< WaveClip * > &clips, double amount, double *allowedAmount=nullptr) |
Decide whether the clips could be offset (and inserted) together without overlapping other clips. More... | |
bool | CanInsertClip (WaveClip *clip, double &slideBy, double &tolerance) const |
std::shared_ptr< WaveClip > | RemoveAndReturnClip (WaveClip *clip) |
bool | AddClip (const std::shared_ptr< WaveClip > &clip) |
Append a clip to the track; which must have the same block factory as this track; return success. More... | |
void | MergeClips (int clipidx1, int clipidx2) |
void | ExpandCutLine (double cutLinePosition, double *cutlineStart=NULL, double *cutlineEnd=NULL) |
bool | RemoveCutLine (double cutLinePosition) |
void | Merge (const Track &orig) |
void | Resample (int rate, BasicUI::ProgressDialog *progress=NULL) |
const TypeInfo & | GetTypeInfo () const override |
Track::Holder | PasteInto (AudacityProject &) const override |
Find or create the destination track for a paste, maybe in a different project. More... | |
ConstIntervals | GetIntervals () const override |
Report times on the track where important intervals begin and end, for UI to snap to. More... | |
Intervals | GetIntervals () override |
const WaveClip * | FindClipByName (const wxString &name) const |
Returns nullptr if clip with such name was not found. More... | |
![]() | |
WritableSampleTrack () | |
WritableSampleTrack (const WritableSampleTrack &other, ProtectedCreationArg &&) | |
~WritableSampleTrack () override | |
const TypeInfo & | GetTypeInfo () const override |
virtual bool | Append (constSamplePtr buffer, sampleFormat format, size_t len, unsigned int stride=1, sampleFormat effectiveFormat=widestSampleFormat)=0 |
Append the sample data to the track. You must call Flush() after the last Append. More... | |
virtual void | Flush ()=0 |
Flush must be called after last Append. More... | |
![]() | |
SampleTrack () | |
SampleTrack (const SampleTrack &other, ProtectedCreationArg &&) | |
~SampleTrack () override | |
AudioGraph::ChannelType | GetChannelType () const final |
Classify this channel. More... | |
const TypeInfo & | GetTypeInfo () const override |
virtual sampleFormat | GetSampleFormat () const =0 |
virtual double | GetRate () const =0 |
virtual sampleFormat | WidestEffectiveFormat () const =0 |
virtual bool | HasTrivialEnvelope () const =0 |
virtual void | GetEnvelopeValues (double *buffer, size_t bufferLen, double t0) const =0 |
Fetch envelope values corresponding to uniformly separated sample times starting at the given time. More... | |
virtual float | GetChannelGain (int channel) const =0 |
Takes gain and pan into account. More... | |
virtual size_t | GetBestBlockSize (sampleCount t) const =0 |
This returns a nonnegative number of samples meant to size a memory buffer. More... | |
virtual size_t | GetMaxBlockSize () const =0 |
This returns a nonnegative number of samples meant to size a memory buffer. More... | |
virtual sampleCount | GetBlockStart (sampleCount t) const =0 |
This returns a possibly large or negative value. More... | |
bool | GetFloats (float *buffer, sampleCount start, size_t len, fillFormat fill=fillZero, bool mayThrow=true, sampleCount *pNumWithinClips=nullptr) const |
Retrieve samples from a track in floating-point format, regardless of the storage format. More... | |
virtual bool | Get (samplePtr buffer, sampleFormat format, sampleCount start, size_t len, fillFormat fill=fillZero, bool mayThrow=true, sampleCount *pNumWithinClips=nullptr) const =0 |
Retrieve samples from a track in a specified format. More... | |
sampleCount | TimeToLongSamples (double t0) const |
Convert correctly between an (absolute) time in seconds and a number of samples. More... | |
double | LongSamplesToTime (sampleCount pos) const |
Convert correctly between a number of samples and an (absolute) time in seconds. More... | |
![]() | |
PlayableTrack () | |
PlayableTrack (const PlayableTrack &orig, ProtectedCreationArg &&) | |
bool | GetMute () const |
bool | GetSolo () const |
bool | GetNotMute () const |
bool | GetNotSolo () const |
void | SetMute (bool m) |
void | SetSolo (bool s) |
void | WriteXMLAttributes (XMLWriter &xmlFile) const |
bool | HandleXMLAttribute (const std::string_view &attr, const XMLAttributeValueView &value) |
![]() | |
AudioTrack () | |
AudioTrack (const Track &orig, ProtectedCreationArg &&a) | |
void | WriteXMLAttributes (XMLWriter &WXUNUSED(xmlFile)) const |
bool | HandleXMLAttribute (const std::string_view &, const XMLAttributeValueView &) |
![]() | |
TrackId | GetId () const |
template<typename Subclass = Track> | |
std::shared_ptr< Subclass > | SharedPointer () |
template<typename Subclass = const Track> | |
auto | SharedPointer () const -> std::enable_if_t< std::is_const_v< Subclass >, std::shared_ptr< Subclass > > |
std::shared_ptr< Track > | SubstitutePendingChangedTrack () |
std::shared_ptr< const Track > | SubstitutePendingChangedTrack () const |
std::shared_ptr< const Track > | SubstituteOriginalTrack () const |
virtual const TypeInfo & | GetTypeInfo () const =0 |
virtual const TypeNames & | GetTypeNames () const |
virtual bool | SupportsBasicEditing () const |
Whether this track type implements cut-copy-paste; by default, true. More... | |
virtual Holder | PasteInto (AudacityProject &) const =0 |
Find or create the destination track for a paste, maybe in a different project. More... | |
virtual ConstIntervals | GetIntervals () const |
Report times on the track where important intervals begin and end, for UI to snap to. More... | |
virtual Intervals | GetIntervals () |
virtual bool | LinkConsistencyFix (bool doFix=true, bool completeList=true) |
Check consistency of channel groups, and maybe fix it. More... | |
bool | LinkConsistencyCheck (bool completeList) |
Do the non-mutating part of consistency fix only and return status. More... | |
bool | HasOwner () const |
std::shared_ptr< TrackList > | GetOwner () const |
LinkType | GetLinkType () const noexcept |
bool | IsAlignedWithLeader () const |
Returns true if the leader track has link type LinkType::Aligned. More... | |
ChannelGroupData & | GetGroupData () |
const ChannelGroupData & | GetGroupData () const |
Track () | |
Track (const Track &orig, ProtectedCreationArg &&) | |
Track & | operator= (const Track &orig)=delete |
virtual | ~Track () |
void | Init (const Track &orig) |
virtual Holder | Duplicate () const |
const wxString & | GetName () const |
Name is always the same for all channels of a group. More... | |
void | SetName (const wxString &n) |
bool | GetSelected () const |
Selectedness is always the same for all channels of a group. More... | |
virtual void | SetSelected (bool s) |
void | EnsureVisible (bool modifyState=false) |
virtual double | GetOffset () const =0 |
void | Offset (double t) |
virtual void | SetOffset (double o) |
virtual Holder | Cut (double WXUNUSED(t0), double WXUNUSED(t1))=0 |
virtual Holder | Copy (double WXUNUSED(t0), double WXUNUSED(t1), bool forClipboard=true) const =0 |
virtual void | Clear (double WXUNUSED(t0), double WXUNUSED(t1))=0 |
virtual void | Paste (double WXUNUSED(t), const Track *WXUNUSED(src))=0 |
virtual void | SyncLockAdjust (double oldT1, double newT1) |
virtual void | Silence (double WXUNUSED(t0), double WXUNUSED(t1))=0 |
virtual void | InsertSilence (double WXUNUSED(t), double WXUNUSED(len))=0 |
bool | SameKindAs (const Track &track) const |
template<typename R = void, typename ... Functions> | |
R | TypeSwitch (const Functions &...functions) |
Use this function rather than testing track type explicitly and making down-casts. More... | |
template<typename R = void, typename ... Functions> | |
R | TypeSwitch (const Functions &...functions) const |
Use this function rather than testing track type explicitly and making down-casts. More... | |
virtual void | WriteXML (XMLWriter &xmlFile) const =0 |
virtual bool | GetErrorOpening () |
virtual double | GetStartTime () const =0 |
virtual double | GetEndTime () const =0 |
void | Notify (bool allChannels, int code=-1) |
bool | Any () const |
bool | IsSelected () const |
bool | IsLeader () const |
bool | IsSelectedLeader () const |
void | AdjustPositions () |
void | WriteCommonXMLAttributes (XMLWriter &xmlFile, bool includeNameAndSelected=true) const |
bool | HandleCommonXMLAttribute (const std::string_view &attr, const XMLAttributeValueView &valueView) |
![]() | |
XMLTagHandler () | |
virtual | ~XMLTagHandler () |
virtual bool | HandleXMLTag (const std::string_view &tag, const AttributesList &attrs)=0 |
virtual void | HandleXMLEndTag (const std::string_view &WXUNUSED(tag)) |
virtual void | HandleXMLContent (const std::string_view &WXUNUSED(content)) |
virtual XMLTagHandler * | HandleXMLChild (const std::string_view &tag)=0 |
void | ReadXMLEndTag (const char *tag) |
void | ReadXMLContent (const char *s, int len) |
XMLTagHandler * | ReadXMLChild (const char *tag) |
![]() | |
~Site () | |
Site () | |
Site (const Site &other) | |
Site & | operator= (const Site &other) |
Site (Site &&other) | |
Site & | operator= (Site &&other) |
size_t | size () const |
How many attachment pointers are in the Site. More... | |
template<typename Subclass = ClientData> | |
Subclass & | Get (const RegisteredFactory &key) |
Get reference to an attachment, creating on demand if not present, down-cast it to Subclass. More... | |
template<typename Subclass = const ClientData> | |
auto | Get (const RegisteredFactory &key) const -> std::enable_if_t< std::is_const< Subclass >::value, Subclass & > |
Get reference to an attachment, creating on demand if not present, down-cast it to Subclass. More... | |
template<typename Subclass = ClientData> | |
Subclass * | Find (const RegisteredFactory &key) |
Get a (bare) pointer to an attachment, or null, down-cast it to Subclass *; will not create on demand. More... | |
template<typename Subclass = const ClientData> | |
auto | Find (const RegisteredFactory &key) const -> std::enable_if_t< std::is_const< Subclass >::value, Subclass * > |
Get a (bare) pointer to an attachment, or null, down-cast it to Subclass *; will not create on demand. More... | |
template<typename ReplacementPointer > | |
void | Assign (const RegisteredFactory &key, ReplacementPointer &&replacement) |
Reassign Site's pointer to ClientData. More... | |
![]() | |
virtual | ~Channel () |
virtual ChannelType | GetChannelType () const =0 |
Classify this channel. More... | |
Static Public Member Functions | |
static wxString | GetDefaultAudioTrackNamePreference () |
static WaveTrack * | New (AudacityProject &project) |
static const TypeInfo & | ClassTypeInfo () |
![]() | |
static const TypeInfo & | ClassTypeInfo () |
![]() | |
static const TypeInfo & | ClassTypeInfo () |
![]() | |
static const TypeInfo & | ClassTypeInfo () |
![]() | |
static const TypeInfo & | ClassTypeInfo () |
![]() | |
template<typename Subclass = Track> | |
static std::shared_ptr< Subclass > | SharedPointer (Track *pTrack) |
template<typename Subclass = const Track> | |
static std::shared_ptr< Subclass > | SharedPointer (const Track *pTrack) |
static const TypeInfo & | ClassTypeInfo () |
static void | FinishCopy (const Track *n, Track *dest) |
template<typename TrackType > | |
static void | checkTrackType () |
template<typename R , typename TrackType , typename... Functions> | |
static R | CallExecutor (R *, std::tuple<> *, TrackType &, const Functions &...) |
template<typename R , typename TrackType , typename... Functions, typename Executor , typename... Executors> | |
static R | CallExecutor (R *, std::tuple< Executor, Executors... > *, TrackType &track, const Functions &...functions) |
template<typename ... Executors> | |
static constexpr unsigned | UsedCases (std::tuple< Executors... > *) |
template<typename Tag , bool IsConst, typename R , typename ... TrackTypes, typename ... Functions> | |
static R | DoTypeSwitch (std::conditional_t< IsConst, const Track, Track > &track, TypeList::List< TrackTypes... >, const Functions &...functions) |
Deduce two packs from arguments. More... | |
![]() | |
static size_t | slots () |
How many static factories have been registered with this specialization of Site. More... | |
Protected Attributes | |
WaveClipHolders | mClips |
sampleFormat | mFormat |
int | mRate |
int | mWaveColorIndex |
![]() | |
std::weak_ptr< TrackList > | mList |
TrackNodePointer | mNode {} |
Holds iterator to self, so that TrackList::Find can be constant-time. More... | |
int | mIndex |
0-based position of this track in its TrackList More... | |
double | mOffset |
Private Member Functions | |
void | Init (const WaveTrack &orig) |
Track::Holder | Clone () const override |
wxString | MakeClipCopyName (const wxString &originalName) const |
wxString | MakeNewClipName () const |
void | DoSetPan (float value) |
void | DoSetGain (float value) |
void | PasteWaveTrack (double t0, const WaveTrack *other) |
Private Attributes | |
SampleBlockFactoryPtr | mpFactory |
wxCriticalSection | mFlushCriticalSection |
wxCriticalSection | mAppendCriticalSection |
double | mLegacyProjectFileOffset |
Friends | |
class | WaveTrackFactory |
Additional Inherited Members | |
![]() | |
std::pair< int, int > | vrulerSize |
![]() | |
bool | DoGetMute () const |
void | DoSetMute (bool value) |
bool | DoGetSolo () const |
void | DoSetSolo (bool value) |
![]() | |
void | SetLinkType (LinkType linkType, bool completeList=true) |
![]() | |
template<typename Function > | |
void | ForEach (const Function &function) |
Invoke function on each ClientData object that has been created in this . More... | |
template<typename Function > | |
void | ForEach (const Function &function) const |
Invoke function on each ClientData object that has been created in this . More... | |
template<typename Function > | |
ClientData * | FindIf (const Function &function) |
Return pointer to first attachment in this that is not null and satisfies a predicate, or nullptr. More... | |
template<typename Function > | |
const ClientData * | FindIf (const Function &function) const |
Return pointer to first attachment in this that is not null and satisfies a predicate, or nullptr. More... | |
void | BuildAll () |
For each RegisteredFactory, if the corresponding attachment is absent in this , build and store it. More... | |
A Track that contains audio waveform data.
Definition at line 50 of file WaveTrack.h.
using WaveTrack::Holder = std::shared_ptr<WaveTrack> |
Definition at line 99 of file WaveTrack.h.
using WaveTrack::Regions = std::vector < Region > |
Definition at line 69 of file WaveTrack.h.
WaveTrack::WaveTrack | ( | const SampleBlockFactoryPtr & | pFactory, |
sampleFormat | format, | ||
double | rate | ||
) |
Definition at line 201 of file WaveTrack.cpp.
References format, mFormat, mLegacyProjectFileOffset, mRate, and mWaveColorIndex.
WaveTrack::WaveTrack | ( | const WaveTrack & | orig, |
ProtectedCreationArg && | a | ||
) |
Copied only in WaveTrack::Clone() !
Definition at line 213 of file WaveTrack.cpp.
References mClips, mLegacyProjectFileOffset, and mpFactory.
|
virtual |
Definition at line 253 of file WaveTrack.cpp.
bool WaveTrack::AddClip | ( | const std::shared_ptr< WaveClip > & | clip | ) |
Append a clip to the track; which must have the same block factory as this track; return success.
Definition at line 1061 of file WaveTrack.cpp.
References mClips.
Referenced by ClearAndPaste(), and EffectReverse::ProcessOneWave().
|
overridevirtual |
Implements WritableSampleTrack.
Definition at line 1606 of file WaveTrack.cpp.
References WaveClip::Append(), format, and RightmostOrNewClip().
Referenced by BlockGenerator::GenerateTrack(), EffectTwoPassSimpleMono::ProcessOne(), and NyquistEffect::PutCallback().
bool WaveTrack::CanInsertClip | ( | WaveClip * | clip, |
double & | slideBy, | ||
double & | tolerance | ||
) | const |
Definition at line 2316 of file WaveTrack.cpp.
References WaveClip::GetPlayEndTime(), WaveClip::GetPlayStartTime(), and mClips.
bool WaveTrack::CanOffsetClips | ( | const std::vector< WaveClip * > & | clips, |
double | amount, | ||
double * | allowedAmount = nullptr |
||
) |
Decide whether the clips could be offset (and inserted) together without overlapping other clips.
(allowedAmount ? *allowedAmount : amount)
clips | not necessarily in this track | |
amount | signed | |
[out] | allowedAmount | if null, test exact amount only; else, largest (in magnitude) possible offset with same sign |
Definition at line 2258 of file WaveTrack.cpp.
References CanOffsetClips(), and mClips.
Referenced by CanOffsetClips().
|
static |
Definition at line 320 of file WaveTrack.cpp.
References typeInfo().
|
override |
Definition at line 688 of file WaveTrack.cpp.
References HandleClear().
Referenced by Cut(), EffectTruncSilence::DoRemoval(), anonymous_namespace{LabelMenus.cpp}::OnCutLabels(), PasteOverPreservingClips(), Generator::Process(), EffectStereoToMono::ProcessOne(), EffectPaulstretch::ProcessOne(), SyncLockAdjust(), and Trim().
void WaveTrack::ClearAndAddCutLine | ( | double | t0, |
double | t1 | ||
) |
Definition at line 694 of file WaveTrack.cpp.
References HandleClear().
Referenced by anonymous_namespace{EditMenus.cpp}::OnCut(), and anonymous_namespace{LabelMenus.cpp}::OnCutLabels().
void WaveTrack::ClearAndPaste | ( | double | t0, |
double | t1, | ||
const Track * | src, | ||
bool | preserve = true , |
||
bool | merge = true , |
||
const TimeWarper * | effectWarper = NULL |
||
) |
Definition at line 746 of file WaveTrack.cpp.
References AddClip(), GetClipIndex(), GetClips(), Track::GetEndTime(), WaveClip::GetPlayEndTime(), WaveClip::GetPlayStartTime(), GetRate(), WaveClip::GetSequenceStartTime(), WaveClip::GetTrimLeft(), WaveClip::GetTrimRight(), HandleClear(), SampleTrack::LongSamplesToTime(), mClips, MergeClips(), min(), mpFactory, WaveClip::Offset(), Paste(), WaveClip::Paste(), WaveClip::SetSequenceStartTime(), WaveClip::SetTrimLeft(), WaveClip::SetTrimRight(), SortedClipArray(), SampleTrack::TimeToLongSamples(), and TimeWarper::Warp().
Referenced by TrackSpectrumTransformer::DoFinish(), EffectSBSMS::Finalize(), WaveTrackSink::Flush(), anonymous_namespace{EditMenus.cpp}::OnPaste(), Generator::Process(), NyquistEffect::ProcessOne(), EffectNoiseRemoval::ProcessOne(), and EffectChangeSpeed::ProcessOne().
|
overrideprivatevirtual |
Implements Track.
Definition at line 365 of file WaveTrack.cpp.
bool WaveTrack::CloseLock | ( | ) |
Definition at line 1820 of file WaveTrack.cpp.
References mClips.
void WaveTrack::ConvertToSampleFormat | ( | sampleFormat | format, |
const std::function< void(size_t)> & | progressReport = {} |
||
) |
Definition at line 501 of file WaveTrack.cpp.
References format, mClips, and mFormat.
Referenced by EffectEqualization::ProcessOne().
|
override |
Definition at line 621 of file WaveTrack.cpp.
References EmptyCopy(), GetEndTime(), GetRate(), GetSampleFormat(), mClips, mpFactory, WaveClip::Offset(), and THROW_INCONSISTENCY_EXCEPTION.
Referenced by CopyNonconst(), Cut(), anonymous_namespace{EditMenus.cpp}::OnSplitCut(), anonymous_namespace{LabelMenus.cpp}::OnSplitCutLabels(), anonymous_namespace{EditMenus.cpp}::OnSplitNew(), PasteOverPreservingClips(), and SplitCut().
Track::Holder WaveTrack::CopyNonconst | ( | double | t0, |
double | t1 | ||
) |
Definition at line 682 of file WaveTrack.cpp.
References Copy().
Referenced by anonymous_namespace{LabelMenus.cpp}::OnCopyLabels(), and anonymous_namespace{LabelMenus.cpp}::OnCutLabels().
WaveClip * WaveTrack::CreateClip | ( | double | offset = .0 , |
const wxString & | name = wxEmptyString |
||
) |
Definition at line 2192 of file WaveTrack.cpp.
References GetWaveColorIndex(), mClips, mFormat, mpFactory, mRate, and name.
Referenced by AUPImportFileHandle::HandleWaveClip(), HandleXMLChild(), Join(), NewestOrNewClip(), and RightmostOrNewClip().
|
override |
Definition at line 532 of file WaveTrack.cpp.
References Clear(), Copy(), and THROW_INCONSISTENCY_EXCEPTION.
void WaveTrack::Disjoin | ( | double | t0, |
double | t1 | ||
) |
Definition at line 1477 of file WaveTrack.cpp.
References PackedArray::end(), WaveTrack::Region::end, floatSample, limitSampleBufferSize(), mClips, min(), SplitDelete(), WaveTrack::Region::start, SampleTrack::TimeToLongSamples(), and WAVETRACK_MERGE_POINT_TOLERANCE.
Referenced by anonymous_namespace{LabelMenus.cpp}::OnDisjoinLabels().
|
private |
Definition at line 418 of file WaveTrack.cpp.
References BasicUI::Get().
Referenced by HandleXMLTag(), and SetGain().
|
private |
Definition at line 436 of file WaveTrack.cpp.
References BasicUI::Get().
Referenced by HandleXMLTag(), and SetPan().
WaveTrack::Holder WaveTrack::EmptyCopy | ( | const SampleBlockFactoryPtr & | pFactory = {} , |
bool | keepLink = true |
||
) | const |
Make another track copying format, rate, color, etc. but containing no clips
It is important to pass the correct factory (that for the project which will own the copy) in the unusual case that a track is copied from another project or the clipboard. For copies within one project, the default will do.
keepLink | if false, make the new track mono. But always preserve any other track group data. |
Definition at line 610 of file WaveTrack.cpp.
References mFormat, mpFactory, mRate, and Track::None.
Referenced by Copy(), TrackSpectrumTransformer::DoStart(), PasteInto(), Generator::Process(), EffectSBSMS::Process(), NyquistEffect::ProcessOne(), EffectNoiseRemoval::ProcessOne(), EffectStereoToMono::ProcessOne(), EffectChangeSpeed::ProcessOne(), and EffectPaulstretch::ProcessOne().
void WaveTrack::ExpandCutLine | ( | double | cutLinePosition, |
double * | cutlineStart = NULL , |
||
double * | cutlineEnd = NULL |
||
) |
Definition at line 2384 of file WaveTrack.cpp.
References BadUserAction, PackedArray::end(), GetEditClipsCanMove(), mClips, and XO().
const WaveClip * WaveTrack::FindClipByName | ( | const wxString & | name | ) | const |
Returns nullptr if clip with such name was not found.
Definition at line 355 of file WaveTrack.cpp.
Referenced by MakeClipCopyName(), and MakeNewClipName().
|
overridevirtual |
Implements WritableSampleTrack.
Definition at line 1679 of file WaveTrack.cpp.
References WaveClip::Flush(), and RightmostOrNewClip().
Referenced by EffectTwoPassSimpleMono::ProcessOne().
|
overridevirtual |
MM: Now that each wave track can contain multiple clips, we don't have a continuous space of samples anymore, but we simulate it, because there are a lot of places (e.g. effects) using this interface. This interface makes much sense for modifying samples, but note that it is not time-accurate, because the "offset" is a double value and therefore can lie inbetween samples. But as long as you use the same value for "start" in both calls to "Set" and "Get" it is guaranteed that the same samples are affected.
Implements SampleTrack.
Definition at line 1945 of file WaveTrack.cpp.
References ClearSamples(), fillTwo, fillZero, floatSample, format, mClips, min(), SAMPLE_SIZE, and wxT().
Referenced by WaveTrackFactory::Get(), and EffectNoiseRemoval::ProcessOne().
|
inline |
Definition at line 401 of file WaveTrack.h.
|
inline |
Definition at line 406 of file WaveTrack.h.
|
overridevirtual |
This returns a nonnegative number of samples meant to size a memory buffer.
Implements SampleTrack.
Definition at line 1629 of file WaveTrack.cpp.
References GetMaxBlockSize(), and mClips.
Referenced by EffectNormalize::AnalyseTrackData(), CompareAudioCommand::Apply(), BlockGenerator::GenerateTrack(), NyquistEffect::GetCallback(), TrackSpectrumTransformer::Process(), EffectNoiseRemoval::ProcessOne(), EffectLoudness::ProcessOne(), EffectNormalize::ProcessOne(), EffectChangeSpeed::ProcessOne(), EffectSimpleMono::ProcessOne(), EffectTwoPassSimpleMono::ProcessOne(), EffectReverse::ProcessOneClip(), resampleCB(), VoiceKey::TestDirectionChanges(), VoiceKey::TestEnergy(), and VoiceKey::TestSignChanges().
|
overridevirtual |
This returns a possibly large or negative value.
Implements SampleTrack.
Definition at line 1613 of file WaveTrack.cpp.
References mClips.
|
overridevirtual |
Takes gain and pan into account.
Implements SampleTrack.
Definition at line 454 of file WaveTrack.cpp.
References GetGain(), and GetPan().
WaveClip * WaveTrack::GetClipAtTime | ( | double | time | ) |
Definition at line 2153 of file WaveTrack.cpp.
References SortedClipArray().
Referenced by SelectHandle::Click(), GetEnvelopeAtTime(), GetSequenceAtTime(), and PasteOverPreservingClips().
WaveClip * WaveTrack::GetClipByIndex | ( | int | index | ) |
Definition at line 2240 of file WaveTrack.cpp.
References mClips.
Referenced by GetClipByIndex(), MergeClips(), and PasteWaveTrack().
const WaveClip * WaveTrack::GetClipByIndex | ( | int | index | ) | const |
Definition at line 2248 of file WaveTrack.cpp.
References GetClipByIndex().
int WaveTrack::GetClipIndex | ( | const WaveClip * | clip | ) | const |
Definition at line 2233 of file WaveTrack.cpp.
References anonymous_namespace{WaveTrack.cpp}::FindClip(), and mClips.
Referenced by ClearAndPaste(), and WaveTrackLocations::Update().
|
inline |
Definition at line 319 of file WaveTrack.h.
Referenced by ProjectFileManager::AddImportedTracks(), WaveClipTrimHandle::AdjustBetweenBorders::AdjustBetweenBorders(), ClearAndPaste(), SpectrumView::DoDraw(), WaveformView::DoDraw(), anonymous_namespace{EditMenus.cpp}::EstimateCopiedBlocks(), anonymous_namespace{EditMenus.cpp}::EstimateCopyBytesCount(), HasTrivialEnvelope(), PasteOverPreservingClips(), EffectReverse::ProcessOneWave(), anonymous_namespace{ClipMenus.cpp}::TwoChannelsHaveSameBoundaries(), and WidestEffectiveFormat().
|
inline |
Definition at line 320 of file WaveTrack.h.
|
static |
Definition at line 164 of file WaveTrack.cpp.
References AudioTrackNameSetting, DefaultName, TranslatableString::empty(), name, and Setting< T >::ReadWithDefault().
Referenced by TracksPrefs::Commit(), EffectBase::DoEffect(), ProjectAudioManager::DoRecord(), anonymous_namespace{WaveTrackMenuItems.cpp}::OnNewStereoTrack(), and anonymous_namespace{WaveTrackMenuItems.cpp}::OnNewWaveTrack().
|
overridevirtual |
Get the time at which the last clip in the track ends, plus recorded stuff.
Implements Track.
Definition at line 1848 of file WaveTrack.cpp.
References mClips.
Referenced by AUPImportFileHandle::AddSilence(), EffectTruncSilence::Analyze(), Copy(), Effect::GetBounds(), PasteWaveTrack(), EffectChangeSpeed::Process(), EffectSBSMS::Process(), NyquistEffect::ProcessOne(), EffectStereoToMono::ProcessOne(), GetInfoCommand::SendTracks(), SyncLockAdjust(), and Trim().
Envelope * WaveTrack::GetEnvelopeAtTime | ( | double | time | ) |
Definition at line 2174 of file WaveTrack.cpp.
References GetClipAtTime(), and WaveClip::GetEnvelope().
|
overridevirtual |
Fetch envelope values corresponding to uniformly separated sample times starting at the given time.
Implements SampleTrack.
Definition at line 2085 of file WaveTrack.cpp.
References limitSampleBufferSize(), mClips, min(), and mRate.
|
overridevirtual |
Reimplemented from Track.
Definition at line 1811 of file WaveTrack.cpp.
References mClips.
float WaveTrack::GetGain | ( | ) | const |
Definition at line 413 of file WaveTrack.cpp.
References BasicUI::Get().
Referenced by WaveTrackControls::GainSlider(), GetChannelGain(), GetInfoCommand::SendTracks(), and SetGain().
size_t WaveTrack::GetIdealBlockSize | ( | ) |
Definition at line 1669 of file WaveTrack.cpp.
References Sequence::GetIdealBlockSize(), WaveClip::GetSequence(), and NewestOrNewClip().
Referenced by NyquistEffect::GetCallback().
|
overridevirtual |
Report times on the track where important intervals begin and end, for UI to snap to.
Some intervals may be empty, and no ordering of the intervals is assumed.
Reimplemented from Track.
Definition at line 345 of file WaveTrack.cpp.
References mClips.
|
overridevirtual |
This overload exposes the extra data of the intervals as non-const This overload exposes the extra data of the intervals as non-const
Reimplemented from Track.
Definition at line 350 of file WaveTrack.cpp.
|
overridevirtual |
This returns a nonnegative number of samples meant to size a memory buffer.
Implements SampleTrack.
Definition at line 1647 of file WaveTrack.cpp.
References GetMaxBlockSize(), mClips, mFormat, and mpFactory.
Referenced by EffectNormalize::AnalyseTrackData(), EffectTruncSilence::Analyze(), CompareAudioCommand::Apply(), BlockGenerator::GenerateTrack(), GetBestBlockSize(), GetMaxBlockSize(), EffectCompressor::InitPass1(), TrackSpectrumTransformer::Process(), EffectSBSMS::Process(), EffectEqualization::ProcessOne(), EffectClickRemoval::ProcessOne(), EffectNoiseRemoval::ProcessOne(), EffectStereoToMono::ProcessOne(), EffectNormalize::ProcessOne(), EffectChangeSpeed::ProcessOne(), EffectSimpleMono::ProcessOne(), EffectTwoPassSimpleMono::ProcessOne(), EffectReverse::ProcessOneClip(), VoiceKey::TestDirectionChanges(), VoiceKey::TestEnergy(), and VoiceKey::TestSignChanges().
std::pair< float, float > WaveTrack::GetMinMax | ( | double | t0, |
double | t1, | ||
bool | mayThrow = true |
||
) | const |
Definition at line 1873 of file WaveTrack.cpp.
References mClips, and THROW_INCONSISTENCY_EXCEPTION.
Referenced by EffectNormalize::AnalyseTrack(), and NyquistEffect::ProcessOne().
int WaveTrack::GetNumClips | ( | ) | const |
Definition at line 2253 of file WaveTrack.cpp.
References mClips.
Referenced by PasteWaveTrack().
|
overridevirtual |
Implements Track.
Definition at line 257 of file WaveTrack.cpp.
References GetStartTime().
Referenced by TranscriptionToolBar::GetSamples(), and SetOffset().
float WaveTrack::GetPan | ( | ) | const |
Definition at line 431 of file WaveTrack.cpp.
References BasicUI::Get().
Referenced by GetChannelGain(), WaveTrackControls::PanSlider(), GetInfoCommand::SendTracks(), and SetPan().
sampleCount WaveTrack::GetPlaySamplesCount | ( | ) | const |
Definition at line 480 of file WaveTrack.cpp.
References mClips.
|
overridevirtual |
Implements SampleTrack.
Definition at line 396 of file WaveTrack.cpp.
References mRate.
Referenced by ProjectFileManager::AddImportedTracks(), SelectHandle::AdjustFreqSelection(), EffectTruncSilence::Analyze(), VoiceKey::CalibrateNoise(), ClearAndPaste(), Copy(), SpectrumVRulerControls::DoHandleWheelRotation(), SpectrumVZoomHandle::DoZoom(), WaveformVZoomHandle::DoZoom(), anonymous_namespace{CutlineHandle.cpp}::FindMergeLine(), SpectrogramBounds::GetBounds(), TranscriptionToolBar::GetSamples(), SelectHandle::MoveSnappingFreqSelection(), VoiceKey::OffBackward(), VoiceKey::OffForward(), VoiceKey::OnBackward(), VoiceKey::OnForward(), PasteOverPreservingClips(), anonymous_namespace{BrushHandle.cpp}::PositionToFrequency(), anonymous_namespace{SelectHandle.cpp}::PositionToFrequency(), Generator::Process(), EffectSBSMS::Process(), NyquistEffect::ProcessOne(), EffectStereoToMono::ProcessOne(), EffectPaulstretch::ProcessOne(), SpectralDataManager::Worker::ProcessOvertones(), SpectralDataManager::Worker::ProcessSnapping(), anonymous_namespace{SampleHandle.cpp}::SampleResolutionTest(), SelectHandle::SnapCenterOnce(), ProjectSelectionManager::SSBL_GetRate(), SelectHandle::StartSnappingFreqSelection(), anonymous_namespace{WaveTrackControls.cpp}::Status1DrawFunction(), and SyncLockAdjust().
float WaveTrack::GetRMS | ( | double | t0, |
double | t1, | ||
bool | mayThrow = true |
||
) | const |
Definition at line 1912 of file WaveTrack.cpp.
References sampleCount::as_double(), mClips, min(), staffpad::audio::simd::sqrt(), and THROW_INCONSISTENCY_EXCEPTION.
Referenced by EffectLoudness::GetTrackRMS(), and NyquistEffect::ProcessOne().
|
inlineoverridevirtual |
Implements SampleTrack.
Definition at line 148 of file WaveTrack.h.
Referenced by Copy(), anonymous_namespace{EditMenus.cpp}::EstimateCopyBytesCount(), and SyncLockAdjust().
Sequence * WaveTrack::GetSequenceAtTime | ( | double | time | ) |
Definition at line 2183 of file WaveTrack.cpp.
References GetClipAtTime(), and WaveClip::GetSequence().
sampleCount WaveTrack::GetSequenceSamplesCount | ( | ) | const |
Definition at line 490 of file WaveTrack.cpp.
References mClips.
|
overridevirtual |
Get the time at which the first clip in the track starts.
Implements Track.
Definition at line 1828 of file WaveTrack.cpp.
References mClips.
Referenced by Effect::GetBounds(), GetOffset(), PasteWaveTrack(), EffectChangeSpeed::Process(), EffectSBSMS::Process(), EffectStereoToMono::ProcessOne(), GetInfoCommand::SendTracks(), and Trim().
|
overridevirtual |
Reimplemented from WritableSampleTrack.
Definition at line 315 of file WaveTrack.cpp.
References typeInfo().
|
inline |
Definition at line 142 of file WaveTrack.h.
Referenced by CreateClip(), and InsertSilence().
void WaveTrack::HandleClear | ( | double | t0, |
double | t1, | ||
bool | addCutLines, | ||
bool | split | ||
) |
Definition at line 1074 of file WaveTrack.cpp.
References anonymous_namespace{WaveTrack.cpp}::FindClip(), GetEditClipsCanMove(), mClips, mpFactory, and THROW_INCONSISTENCY_EXCEPTION.
Referenced by Clear(), ClearAndAddCutLine(), ClearAndPaste(), and SplitDelete().
|
overridevirtual |
Implements XMLTagHandler.
Definition at line 1743 of file WaveTrack.cpp.
References CreateClip(), XMLMethodRegistry< Host >::Get(), WaveClip::GetEnvelope(), WaveClip::GetSequence(), mLegacyProjectFileOffset, NewestOrNewClip(), and WaveClip::SetSequenceStartTime().
|
override |
Definition at line 1736 of file WaveTrack.cpp.
References WaveClip::HandleXMLEndTag(), and NewestOrNewClip().
|
overridevirtual |
Implements XMLTagHandler.
Definition at line 1685 of file WaveTrack.cpp.
References DoSetGain(), DoSetPan(), Track::HandleCommonXMLAttribute(), PlayableTrack::HandleXMLAttribute(), Sequence::IsValidSampleFormat(), lrint, mFormat, mLegacyProjectFileOffset, mRate, mWaveColorIndex, Track::SetLinkType(), and anonymous_namespace{WaveTrack.cpp}::ToLinkType().
|
overridevirtual |
Implements SampleTrack.
Definition at line 2078 of file WaveTrack.cpp.
References GetClips().
|
private |
Definition at line 224 of file WaveTrack.cpp.
References Track::Init(), mFormat, mpFactory, mRate, and mWaveColorIndex.
Referenced by Reinit().
|
override |
Definition at line 1437 of file WaveTrack.cpp.
References PackedArray::end(), GetWaveColorIndex(), mClips, mFormat, mpFactory, mRate, and THROW_INCONSISTENCY_EXCEPTION.
Referenced by AUPImportFileHandle::AddSilence(), EffectSilence::GenerateTrack(), and FFmpegImportFileHandle::Import().
bool WaveTrack::IsEmpty | ( | double | t0, |
double | t1 | ||
) | const |
Returns true if there are no WaveClips in the specified region.
Definition at line 510 of file WaveTrack.cpp.
References mClips.
Referenced by PasteWaveTrack(), Generator::Process(), and SyncLockAdjust().
void WaveTrack::Join | ( | double | t0, |
double | t1 | ||
) |
Definition at line 1548 of file WaveTrack.cpp.
References CreateClip(), PackedArray::end(), anonymous_namespace{WaveTrack.cpp}::FindClip(), Track::GetName(), mClips, and mRate.
Referenced by anonymous_namespace{LabelMenus.cpp}::OnJoinLabels(), and PasteOverPreservingClips().
|
overridevirtual |
Check consistency of channel groups, and maybe fix it.
doFix | whether to make any changes to correct inconsistencies |
completeList | whether to assume that the TrackList containing this is completely loaded; if false, skip some of the checks |
Reimplemented from Track.
Definition at line 274 of file WaveTrack.cpp.
References Track::Aligned, anonymous_namespace{WaveTrack.cpp}::AreAligned(), ClientData::Site< Host, ClientData, ObjectCopyingPolicy, Pointer, ObjectLockingPolicy, RegistryLockingPolicy >::Find(), Track::GetLinkType(), Track::GetName(), Track::GetOwner(), Track::Group, Track::LinkConsistencyFix(), Track::None, Track::SetLinkType(), and SortedClipArray().
|
private |
Definition at line 372 of file WaveTrack.cpp.
References FindClipByName(), name, and XC.
Referenced by PasteWaveTrack().
|
private |
Definition at line 384 of file WaveTrack.cpp.
References FindClipByName(), Track::GetName(), name, and XC.
Referenced by NewestOrNewClip(), PasteWaveTrack(), and RightmostOrNewClip().
void WaveTrack::Merge | ( | const Track & | orig | ) |
Definition at line 243 of file WaveTrack.cpp.
References Track::TypeSwitch().
Referenced by WaveTrackMenuTable::OnMergeStereo().
void WaveTrack::MergeClips | ( | int | clipidx1, |
int | clipidx2 | ||
) |
Definition at line 2447 of file WaveTrack.cpp.
References anonymous_namespace{WaveTrack.cpp}::FindClip(), GetClipByIndex(), WaveClip::GetPlayEndTime(), mClips, and WaveClip::Paste().
Referenced by ClearAndPaste().
|
static |
Definition at line 192 of file WaveTrack.cpp.
References TrackList::Get(), and WaveTrackFactory::Get().
WaveClip * WaveTrack::NewestOrNewClip | ( | ) |
Get access to the most recently added clip, or create a clip, if there is not already one. THIS IS NOT NECESSARILY RIGHTMOST.
Definition at line 2202 of file WaveTrack.cpp.
References CreateClip(), MakeNewClipName(), mClips, and Track::mOffset.
Referenced by GetIdealBlockSize(), HandleXMLChild(), and HandleXMLEndTag().
|
override |
Definition at line 1403 of file WaveTrack.cpp.
References PasteWaveTrack().
Referenced by ClearAndPaste(), PasteOverPreservingClips(), EffectStereoToMono::ProcessOne(), EffectPaulstretch::ProcessOne(), and SyncLockAdjust().
|
overridevirtual |
Find or create the destination track for a paste, maybe in a different project.
use_count()
can tell whether it is new Implements Track.
Definition at line 336 of file WaveTrack.cpp.
References EmptyCopy(), and WaveTrackFactory::Get().
|
private |
Definition at line 1248 of file WaveTrack.cpp.
References BadUserAction, GetClipByIndex(), GetEditClipsCanMove(), GetEndTime(), GetNumClips(), Track::GetOwner(), WaveClip::GetPlayEndTime(), WaveClip::GetPlayStartTime(), GetStartTime(), IsEmpty(), SampleTrack::LongSamplesToTime(), MakeClipCopyName(), MakeNewClipName(), mClips, mpFactory, mRate, WaveClip::Paste(), SplitAt(), SampleTrack::TimeToLongSamples(), and XO().
Referenced by Paste().
void WaveTrack::Reinit | ( | const WaveTrack & | orig | ) |
Definition at line 234 of file WaveTrack.cpp.
References Init().
Referenced by ProjectAudioManager::DoRecord().
Definition at line 1048 of file WaveTrack.cpp.
References anonymous_namespace{WaveTrack.cpp}::FindClip(), and mClips.
Referenced by EffectReverse::ProcessOneWave().
bool WaveTrack::RemoveCutLine | ( | double | cutLinePosition | ) |
Definition at line 2437 of file WaveTrack.cpp.
References mClips.
void WaveTrack::Resample | ( | int | rate, |
BasicUI::ProgressDialog * | progress = NULL |
||
) |
WaveClip * WaveTrack::RightmostOrNewClip | ( | ) |
Get access to the last (rightmost) clip, or create a clip, if there is not already one.
Definition at line 2212 of file WaveTrack.cpp.
References CreateClip(), PackedArray::end(), WaveClip::GetPlayStartTime(), MakeNewClipName(), mClips, and Track::mOffset.
Referenced by AUPImportFileHandle::AddSamples(), Append(), Flush(), and AUPImportFileHandle::HandleEnvelope().
void WaveTrack::Set | ( | constSamplePtr | buffer, |
sampleFormat | format, | ||
sampleCount | start, | ||
size_t | len, | ||
sampleFormat | effectiveFormat = widestSampleFormat |
||
) |
effectiveFormat | Make the effective format of the data at least the minumum of this value and `format`. (Maybe wider, if merging with preexistent data.) If the data are later narrowed from stored format, but not narrower than the effective, then no dithering will occur. |
Definition at line 2028 of file WaveTrack.cpp.
References format, mClips, min(), and SAMPLE_SIZE.
Referenced by EffectAutoDuck::ApplyDuckFade(), WaveTrackSink::DoConsume(), EffectTruncSilence::DoRemoval(), EffectClickRemoval::ProcessOne(), EffectRepair::ProcessOne(), EffectNormalize::ProcessOne(), EffectSimpleMono::ProcessOne(), EffectTwoPassSimpleMono::ProcessOne(), and EffectReverse::ProcessOneClip().
void WaveTrack::SetGain | ( | float | newGain | ) |
Definition at line 423 of file WaveTrack.cpp.
References DoSetGain(), GetGain(), and Track::Notify().
Referenced by MixerTrackCluster::HandleSliderGain(), and anonymous_namespace{TrackMenus.cpp}::SetTrackGain().
|
overridevirtual |
Reimplemented from Track.
Definition at line 263 of file WaveTrack.cpp.
References GetOffset(), mClips, and Track::mOffset.
void WaveTrack::SetPan | ( | float | newPan | ) |
Definition at line 441 of file WaveTrack.cpp.
References DoSetPan(), GetPan(), and Track::Notify().
Referenced by MixerTrackCluster::HandleSliderPan(), WaveTrackMenuTable::OnMergeStereo(), anonymous_namespace{TrackMenus.cpp}::SetTrackPan(), and WaveTrackMenuTable::SplitStereo().
void WaveTrack::SetRate | ( | double | newRate | ) |
Definition at line 401 of file WaveTrack.cpp.
void WaveTrack::SetWaveColorIndex | ( | int | colorIndex | ) |
Definition at line 473 of file WaveTrack.cpp.
References mClips, and mWaveColorIndex.
Referenced by SetTrackVisualsCommand::ApplyInner().
|
override |
Definition at line 1412 of file WaveTrack.cpp.
References PackedArray::end(), mClips, min(), THROW_INCONSISTENCY_EXCEPTION, and SampleTrack::TimeToLongSamples().
Referenced by anonymous_namespace{LabelMenus.cpp}::OnSilenceLabels(), anonymous_namespace{EditMenus.cpp}::OnSplitCut(), anonymous_namespace{LabelMenus.cpp}::OnSplitCutLabels(), and anonymous_namespace{LabelMenus.cpp}::OnSplitDeleteLabels().
WaveClipPointers WaveTrack::SortedClipArray | ( | ) |
Definition at line 2489 of file WaveTrack.cpp.
References mClips.
Referenced by SetClipCommand::ApplyInner(), SetEnvelopeCommand::ApplyInner(), ClearAndPaste(), EffectSBSMS::Finalize(), anonymous_namespace{ClipMenus.cpp}::FindNextClip(), anonymous_namespace{ClipMenus.cpp}::FindNextClipBoundary(), anonymous_namespace{ClipMenus.cpp}::FindPrevClip(), anonymous_namespace{ClipMenus.cpp}::FindPrevClipBoundary(), GetClipAtTime(), LinkConsistencyFix(), NyquistEffect::ProcessOne(), EffectChangeSpeed::ProcessOne(), EffectReverse::ProcessOneWave(), GetInfoCommand::SendClips(), GetInfoCommand::SendEnvelopes(), and WaveTrackLocations::Update().
WaveClipConstPointers WaveTrack::SortedClipArray | ( | ) | const |
Definition at line 2494 of file WaveTrack.cpp.
References mClips.
void WaveTrack::Split | ( | double | t0, |
double | t1 | ||
) |
Definition at line 2355 of file WaveTrack.cpp.
References SplitAt().
Referenced by anonymous_namespace{LabelMenus.cpp}::OnSplitLabels().
void WaveTrack::SplitAt | ( | double | t | ) |
Definition at line 2363 of file WaveTrack.cpp.
References SampleTrack::LongSamplesToTime(), mClips, mpFactory, and SampleTrack::TimeToLongSamples().
Referenced by PasteWaveTrack(), EffectReverse::ProcessOneWave(), and Split().
Track::Holder WaveTrack::SplitCut | ( | double | t0, |
double | t1 | ||
) |
Definition at line 545 of file WaveTrack.cpp.
References Copy(), SplitDelete(), and THROW_INCONSISTENCY_EXCEPTION.
Referenced by anonymous_namespace{EditMenus.cpp}::OnSplitCut(), and anonymous_namespace{LabelMenus.cpp}::OnSplitCutLabels().
void WaveTrack::SplitDelete | ( | double | t0, |
double | t1 | ||
) |
Definition at line 1006 of file WaveTrack.cpp.
References HandleClear().
Referenced by Disjoin(), EffectSBSMS::Finalize(), anonymous_namespace{EditMenus.cpp}::OnSplitDelete(), anonymous_namespace{LabelMenus.cpp}::OnSplitDeleteLabels(), anonymous_namespace{EditMenus.cpp}::OnSplitNew(), EffectChangeSpeed::ProcessOne(), SplitCut(), and Trim().
|
overridevirtual |
Reimplemented from Track.
Definition at line 1207 of file WaveTrack.cpp.
References Clear(), EditClipsCanMove, GetEndTime(), GetRate(), GetSampleFormat(), IsEmpty(), mClips, mpFactory, mRate, Paste(), and Setting< T >::Read().
Referenced by EffectPaulstretch::Process().
void WaveTrack::Trim | ( | double | t0, |
double | t1 | ||
) |
Definition at line 578 of file WaveTrack.cpp.
References Clear(), GetEndTime(), GetStartTime(), mClips, and SplitDelete().
Referenced by anonymous_namespace{EditMenus.cpp}::OnTrim().
|
overridevirtual |
Implements SampleTrack.
Definition at line 2068 of file WaveTrack.cpp.
References format, GetClips(), and narrowestSampleFormat.
|
overridevirtual |
Implements Track.
Definition at line 1783 of file WaveTrack.cpp.
References XMLMethodRegistry< Host >::CallWriters(), XMLMethodRegistry< Host >::Get(), Track::WriteCommonXMLAttributes(), PlayableTrack::WriteXMLAttributes(), and wxT().
|
friend |
Definition at line 93 of file WaveTrack.h.
|
private |
Definition at line 529 of file WaveTrack.h.
|
protected |
Definition at line 514 of file WaveTrack.h.
Referenced by AddClip(), WaveTrack::AllClipsIterator::AllClipsIterator(), CanInsertClip(), CanOffsetClips(), ClearAndPaste(), CloseLock(), ConvertToSampleFormat(), Copy(), CreateClip(), Disjoin(), ExpandCutLine(), FindClipByName(), Get(), GetBestBlockSize(), GetBlockStart(), GetClipByIndex(), GetClipIndex(), GetEndTime(), GetEnvelopeValues(), GetErrorOpening(), GetIntervals(), GetMaxBlockSize(), GetMinMax(), GetNumClips(), GetPlaySamplesCount(), GetRMS(), GetSequenceSamplesCount(), GetStartTime(), HandleClear(), InsertSilence(), IsEmpty(), Join(), MergeClips(), NewestOrNewClip(), PasteWaveTrack(), RemoveAndReturnClip(), RemoveCutLine(), Resample(), RightmostOrNewClip(), Set(), SetOffset(), SetRate(), SetWaveColorIndex(), Silence(), SortedClipArray(), SplitAt(), SyncLockAdjust(), Trim(), and WaveTrack().
|
private |
Definition at line 528 of file WaveTrack.h.
|
protected |
Definition at line 516 of file WaveTrack.h.
Referenced by ConvertToSampleFormat(), CreateClip(), EmptyCopy(), GetMaxBlockSize(), HandleXMLTag(), Init(), InsertSilence(), and WaveTrack().
|
private |
Definition at line 530 of file WaveTrack.h.
Referenced by HandleXMLChild(), HandleXMLTag(), and WaveTrack().
|
private |
Definition at line 526 of file WaveTrack.h.
Referenced by ClearAndPaste(), Copy(), CreateClip(), EmptyCopy(), GetMaxBlockSize(), HandleClear(), Init(), InsertSilence(), PasteWaveTrack(), SplitAt(), SyncLockAdjust(), and WaveTrack().
|
protected |
Definition at line 517 of file WaveTrack.h.
Referenced by CreateClip(), EmptyCopy(), GetEnvelopeValues(), GetRate(), HandleXMLTag(), Init(), InsertSilence(), Join(), PasteWaveTrack(), Resample(), SetRate(), SyncLockAdjust(), and WaveTrack().
|
protected |
Definition at line 518 of file WaveTrack.h.
Referenced by HandleXMLTag(), Init(), SetWaveColorIndex(), and WaveTrack().