Audacity 3.2.0
|
A Track that contains audio waveform data. More...
#include <WaveTrack.h>
Classes | |
class | AllClipsConstIterator |
class | AllClipsIterator |
class | Interval |
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 | ProgressReport = std::function< bool(double)> |
using | IntervalHolder = std::shared_ptr< Interval > |
using | IntervalConstHolder = std::shared_ptr< const Interval > |
Public Types inherited from Track | |
using | AttachedObjects = ::AttachedTrackObjects |
Alias for my base type. More... | |
using | Holder = std::shared_ptr< Track > |
Public Types inherited from ClientData::Site< Host, ClientData, ObjectCopyingPolicy, Pointer, ObjectLockingPolicy, RegistryLockingPolicy > | |
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 Types inherited from ChannelGroup | |
enum class | LinkType : int { None = 0 , Group = 2 , Aligned } |
For two tracks describes the type of the linkage. More... | |
using | Attachments = ClientData::Site< ChannelGroupData, ClientData::Cloneable<>, ClientData::DeepCopying > |
using | Interval = WideChannelGroupInterval |
Public Types inherited from Channel | |
using | Interval = ChannelInterval |
Public Member Functions | |
WaveTrack (const SampleBlockFactoryPtr &pFactory, sampleFormat format, double rate) | |
WaveTrack (const WaveTrack &orig, ProtectedCreationArg &&, bool backup) | |
Copied only in WaveTrack::Clone() ! More... | |
size_t | GetWidth () const |
The width of every WaveClip in this track; for now always 1. More... | |
size_t | NChannels () const override |
May report more than one only when this is a leader track. More... | |
auto | GetChannel (size_t iChannel) |
auto | GetChannel (size_t iChannel) const |
auto | Channels () |
auto | Channels () const |
AudioGraph::ChannelType | GetChannelType () const override |
Classify this channel. More... | |
void | Reinit (const WaveTrack &orig) |
virtual | ~WaveTrack () |
void | MoveTo (double o) override |
bool | LinkConsistencyFix (bool doFix) override |
Check consistency of channel groups, and maybe fix it. More... | |
double | GetStartTime () const override |
Implement WideSampleSequence. More... | |
double | GetEndTime () const override |
Implement WideSampleSequence. 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 | GetVisibleSampleCount () const |
sampleCount | GetSequenceSamplesCount () const |
size_t | CountBlocks () const |
sampleFormat | GetSampleFormat () const override |
void | ConvertToSampleFormat (sampleFormat format, const std::function< void(size_t)> &progressReport={}) |
TrackListHolder | Cut (double t0, double t1) override |
Create tracks and modify this track. More... | |
Holder | EmptyCopy (const SampleBlockFactoryPtr &pFactory={}, bool keepLink=true) const |
TrackListHolder | WideEmptyCopy (const SampleBlockFactoryPtr &pFactory={}, bool keepLink=true) const |
TrackListHolder | MonoToStereo () |
TrackListHolder | Copy (double t0, double t1, bool forClipboard=true) const override |
Create new tracks and don't modify this track. More... | |
void | Clear (double t0, double t1) override |
void | Paste (double t0, const Track &src) override |
void | ClearAndPaste (double t0, double t1, const WaveTrack &src, bool preserve=true, bool merge=true, const TimeWarper *effectWarper=nullptr, bool clearByTrimming=false) |
void | ClearAndPaste (double t0, double t1, const TrackList &src, bool preserve=true, bool merge=true, const TimeWarper *effectWarper=nullptr) |
void | Silence (double t0, double t1, ProgressReporter reportProgress) override |
void | InsertSilence (double t, double len) override |
void | Split (double t0, double t1) |
void | ClearAndAddCutLine (double t0, double t1) |
TrackListHolder | SplitCut (double t0, double t1) |
void | SplitDelete (double t0, double t1) |
void | Join (double t0, double t1, const ProgressReporter &reportProgress) |
void | Disjoin (double t0, double t1) |
void | Trim (double t0, double t1) |
void | ApplyPitchAndSpeed (std::optional< TimeInterval > interval, ProgressReporter reportProgress) |
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, size_t iChannel=0) override |
void | Flush () override |
bool | IsLeader () const override |
bool | DoGet (size_t iChannel, size_t nBuffers, const samplePtr buffers[], sampleFormat format, sampleCount start, size_t len, bool backwards, fillFormat fill=FillFormat::fillZero, bool mayThrow=true, sampleCount *pNumWithinClips=nullptr) const override |
This fails if any clip overlapping the range has non-unit stretch ratio! More... | |
std::pair< size_t, size_t > | GetFloatsCenteredAroundTime (double t, size_t iChannel, float *buffer, size_t numSideSamples, bool mayThrow) const |
Gets as many samples as it can, but no more than 2 * numSideSamples + 1 , centered around t . Reads nothing if GetClipAtTime(t) == nullptr . Useful to access samples across clip boundaries, as it spreads the read to adjacent clips, i.e., not separated by silence from clip at t . More... | |
bool | GetFloatAtTime (double t, size_t iChannel, float &value, bool mayThrow) const |
void | SetFloatsCenteredAroundTime (double t, size_t iChannel, const float *buffer, size_t numSideSamples, sampleFormat effectiveFormat) |
Similar to GetFloatsCenteredAroundTime, but for writing. Sets as many samples as it can according to the same rules as GetFloatsCenteredAroundTime. Leaves the other samples untouched. More... | |
void | SetFloatAtTime (double t, size_t iChannel, float value, sampleFormat effectiveFormat) |
Sets sample nearest to t to value . Silently fails if GetClipAtTime(t) == nullptr . More... | |
void | SetFloatsWithinTimeRange (double t0, double t1, size_t iChannel, const std::function< float(double sampleTime)> &producer, sampleFormat effectiveFormat) |
Provides a means of setting clip values as a function of time. Included are closest sample to t0 up to closest sample to t1, exclusively. If the given interval is empty, i.e., t0 >= t1 , no action is taken. More... | |
ChannelGroupSampleView | GetSampleView (double t0, double t1, bool mayThrow=true) const |
Request samples within [t0, t1), not knowing in advance how many this will be. More... | |
sampleFormat | WidestEffectiveFormat () const override |
bool | HasTrivialEnvelope () const override |
void | GetEnvelopeValues (double *buffer, size_t bufferLen, double t0, bool backwards) const override |
Envelope * | GetEnvelopeAtTime (double time) |
const WaveClip * | GetClipAtTime (double time) const |
WaveClip * | GetClipAtTime (double time) |
WaveClipConstHolders | GetClipsIntersecting (double t0, double t1) const |
const WaveClip * | GetNextClip (const WaveClip &clip, PlaybackDirection searchDirection) const |
Returns clips next to clip in the given direction, or nullptr if there is none. More... | |
WaveClip * | GetNextClip (const WaveClip &clip, PlaybackDirection searchDirection) |
Returns clips next to clip in the given direction, or nullptr if there is none. More... | |
const WaveClip * | GetAdjacentClip (const WaveClip &clip, PlaybackDirection searchDirection) const |
Similar to GetNextClip, but returns nullptr if the neighbour clip is not adjacent. More... | |
WaveClip * | GetAdjacentClip (const WaveClip &clip, PlaybackDirection searchDirection) |
Similar to GetNextClip, but returns nullptr if the neighbour clip is not adjacent. More... | |
size_t | GetBestBlockSize (sampleCount t) const |
size_t | GetMaxBlockSize () const |
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 |
std::optional< TranslatableString > | GetErrorOpening () const override |
bool | CloseLock () noexcept |
Should be called upon project close. Not balanced by unlocking calls. More... | |
WaveClipHolders & | GetClips () |
const WaveClipConstHolders & | GetClips () const |
const WaveClip * | GetLeftmostClip () const |
const WaveClip * | GetRightmostClip () const |
ClipHolders | GetClipInterfaces () const |
Get access to the (visible) clips in the tracks, in unspecified order. More... | |
IteratorRange< AllClipsIterator > | GetAllClips () |
IteratorRange< AllClipsConstIterator > | GetAllClips () const |
void | CreateWideClip (double offset=.0, const wxString &name=wxEmptyString) |
WaveClip * | CreateClip (double offset=.0, const wxString &name=wxEmptyString) |
Create new clip and add it to this track. More... | |
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) |
Get the nth clip in this WaveTrack (will return nullptr if not found). More... | |
const WaveClip * | GetClipByIndex (int index) const |
Get the nth clip in this WaveTrack (will return nullptr if not found). More... | |
int | GetNumClips () const |
int | GetNumClips (double t0, double t1) const |
WaveClipPointers | SortedClipArray () |
WaveClipConstPointers | SortedClipArray () const |
bool | HasHiddenData () const |
Whether any clips have hidden audio. More... | |
void | DiscardTrimmed () |
Remove hidden audio from all clips. More... | |
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 (const WaveClip &clip, double &slideBy, double tolerance) const |
std::shared_ptr< WaveClip > | RemoveAndReturnClip (WaveClip *clip) |
bool | AddClip (const std::shared_ptr< WaveClip > &clip) |
bool | MergeClips (int clipidx1, int clipidx2) |
void | ExpandCutLine (double cutLinePosition, double *cutlineStart=nullptr, double *cutlineEnd=nullptr) |
bool | RemoveCutLine (double cutLinePosition) |
Remove cut line, without expanding the audio in it. More... | |
void | Resample (int rate, BasicUI::ProgressDialog *progress=NULL) |
bool | Reverse (sampleCount start, sampleCount len, const ProgressReport &report={}) |
const TypeInfo & | GetTypeInfo () const override |
IntervalConstHolder | GetNextInterval (const Interval &interval, PlaybackDirection searchDirection) const |
IntervalHolder | GetNextInterval (const Interval &interval, PlaybackDirection searchDirection) |
IntervalHolder | GetIntervalAtTime (double t) |
auto | Intervals () |
auto | Intervals () const |
Track::Holder | PasteInto (AudacityProject &project, TrackList &list) const override |
const WaveClip * | FindClipByName (const wxString &name) const |
Returns nullptr if clip with such name was not found. More... | |
size_t | NIntervals () const override |
used only during deserialization More... | |
void | SetLegacyFormat (sampleFormat format) |
void | CopyClipEnvelopes () |
bool | GetFloats (float *buffer, sampleCount start, size_t len, fillFormat fill=FillFormat::fillZero, bool mayThrow=true, sampleCount *pNumWithinClips=nullptr) const |
"narrow" overload fetches first channel only More... | |
bool | GetFloats (size_t iChannel, size_t nBuffers, float *const buffers[], sampleCount start, size_t len, bool backwards=false, fillFormat fill=FillFormat::fillZero, bool mayThrow=true, sampleCount *pNumWithinClips=nullptr) const |
virtual void | Paste (double t, const Track &src)=0 |
Weak precondition allows overrides to replicate one channel into many. More... | |
void | Paste (double t, const TrackList &src) |
PlayableSequence implementation | |
const ChannelGroup * | FindChannelGroup () const override |
Find associated ChannelGroup if any. More... | |
bool | GetMute () const override |
May vary asynchronously. More... | |
bool | GetSolo () const override |
May vary asynchronously. More... | |
Public Member Functions inherited from WritableSampleTrack | |
WritableSampleTrack () | |
WritableSampleTrack (const WritableSampleTrack &other, ProtectedCreationArg &&) | |
~WritableSampleTrack () override | |
const TypeInfo & | GetTypeInfo () const override |
bool | IsLeader () const override |
virtual size_t | NChannels () const=0 |
Report the number of channels. More... | |
virtual double | GetRate () const=0 |
Public Member Functions inherited from SampleTrack | |
SampleTrack () | |
SampleTrack (const SampleTrack &other, ProtectedCreationArg &&) | |
~SampleTrack () override | |
const TypeInfo & | GetTypeInfo () const override |
virtual sampleFormat | GetSampleFormat () const =0 |
bool | GetFloats (float *buffer, sampleCount start, size_t len, fillFormat fill=FillFormat::fillZero, bool mayThrow=true, sampleCount *pNumWithinClips=nullptr) const |
"narrow" overload fetches first channel only More... | |
double | GetStartTime () const |
Get the minimum of Start() values of intervals, or 0 when none. More... | |
double | GetEndTime () const |
Get the maximum of End() values of intervals, or 0 when none. More... | |
bool | IsLeader () const override |
bool | GetFloats (size_t iChannel, size_t nBuffers, float *const buffers[], sampleCount start, size_t len, bool backwards=false, fillFormat fill=FillFormat::fillZero, bool mayThrow=true, sampleCount *pNumWithinClips=nullptr) const |
Public Member Functions inherited from PlayableTrack | |
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) |
Public Member Functions inherited from AudioTrack | |
AudioTrack () | |
AudioTrack (const Track &orig, ProtectedCreationArg &&a) | |
void | WriteXMLAttributes (XMLWriter &WXUNUSED(xmlFile)) const |
bool | HandleXMLAttribute (const std::string_view &, const XMLAttributeValueView &) |
Public Member Functions inherited from Track | |
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 &project, TrackList &list) const =0 |
virtual bool | LinkConsistencyFix (bool doFix=true) |
Check consistency of channel groups, and maybe fix it. More... | |
bool | LinkConsistencyCheck () |
Do the non-mutating part of consistency fix only and return status. More... | |
bool | HasOwner () const |
std::shared_ptr< TrackList > | GetOwner () const |
TrackList * | GetHolder () const |
LinkType | GetLinkType () const noexcept |
ChannelGroupData & | GetGroupData () |
const ChannelGroupData & | GetGroupData () const |
May make group data on demand, but consider that logically const. More... | |
Track () | |
Track (const Track &orig, ProtectedCreationArg &&) | |
Track & | operator= (const Track &orig)=delete |
virtual | ~Track () |
void | Init (const Track &orig) |
virtual TrackListHolder | Duplicate (DuplicateOptions={}) const |
public nonvirtual duplication function that invokes Clone() More... | |
void | ReparentAllAttachments () |
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 | OnProjectTempoChange (double newTempo) |
method to set project tempo on track More... | |
virtual TrackListHolder | Cut (double t0, double t1)=0 |
Create tracks and modify this track. More... | |
virtual TrackListHolder | Copy (double t0, double t1, bool forClipboard=true) const =0 |
Create new tracks and don't modify this track. More... | |
virtual void | Clear (double t0, double t1)=0 |
virtual void | Paste (double t, const Track &src)=0 |
Weak precondition allows overrides to replicate one channel into many. More... | |
void | Paste (double t, const TrackList &src) |
virtual void | SyncLockAdjust (double oldT1, double newT1) |
virtual void | Silence (double t0, double t1, ProgressReporter reportProgress={})=0 |
virtual void | InsertSilence (double t, double len)=0 |
bool | SameKindAs (const Track &track) const |
template<typename R = void, typename ... Functions> | |
R | TypeSwitch (const Functions &...functions) |
template<typename R = void, typename ... Functions> | |
R | TypeSwitch (const Functions &...functions) const |
virtual void | WriteXML (XMLWriter &xmlFile) const =0 |
virtual std::optional< TranslatableString > | GetErrorOpening () const |
void | Notify (bool allChannels, int code=-1) |
bool | Any () const |
bool | IsSelected () const |
bool | IsLeader () const override |
bool | IsSelectedLeader () const |
void | AdjustPositions () |
void | WriteCommonXMLAttributes (XMLWriter &xmlFile, bool includeNameAndSelected=true) const |
bool | HandleCommonXMLAttribute (const std::string_view &attr, const XMLAttributeValueView &valueView) |
const std::optional< double > & | GetProjectTempo () const |
Public Member Functions inherited from XMLTagHandler | |
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) |
Public Member Functions inherited from ClientData::Site< Host, ClientData, ObjectCopyingPolicy, Pointer, ObjectLockingPolicy, RegistryLockingPolicy > | |
~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... | |
Public Member Functions inherited from ChannelGroup | |
virtual | ~ChannelGroup () |
double | GetStartTime () const |
Get the minimum of Start() values of intervals, or 0 when none. More... | |
double | GetEndTime () const |
Get the maximum of End() values of intervals, or 0 when none. More... | |
void | ShiftBy (double t) |
Change start time by given duration. More... | |
virtual void | MoveTo (double o)=0 |
Change start time to given time point. More... | |
virtual bool | IsLeader () const =0 |
ChannelGroupData & | GetGroupData () |
Make attachment site on demand as needed. More... | |
const ChannelGroupData & | GetGroupData () const |
ChannelGroupData * | FindGroupData () |
Do not make attachment site on demand if absent. More... | |
const ChannelGroupData * | FindGroupData () const |
Do not make attachment site on demand if absent. More... | |
void | Init (const ChannelGroup &other) |
Copy, including cloning of attached objects. More... | |
void | DestroyGroupData () |
Leave all attachments null. More... | |
std::unique_ptr< ChannelGroupData > | DetachGroupData () |
Move attachments out. More... | |
void | AssignGroupData (std::unique_ptr< ChannelGroupData > pGroupData) |
Replace any previous attachments. More... | |
template<typename ChannelType = Channel> | |
std::shared_ptr< ChannelType > | GetChannel (size_t iChannel) |
Retrieve a channel, cast to the given type. More... | |
template<typename ChannelType = const Channel> | |
auto | GetChannel (size_t iChannel) const -> std::enable_if_t< std::is_const_v< ChannelType >, std::shared_ptr< ChannelType > > |
template<typename ChannelType = Channel> | |
IteratorRange< ChannelIterator< ChannelType > > | Channels () |
Get range of channels with mutative access. More... | |
template<typename ChannelType = const Channel> | |
auto | Channels () const -> std::enable_if_t< std::is_const_v< ChannelType >, IteratorRange< ChannelIterator< ChannelType > > > |
Get range of channels with read-only access. More... | |
template<typename IntervalType = Interval> | |
std::shared_ptr< IntervalType > | GetInterval (size_t iInterval) |
Retrieve an interval, cast to the given type. More... | |
template<typename IntervalType = const Interval> | |
auto | GetInterval (size_t iInterval) const -> std::enable_if_t< std::is_const_v< IntervalType >, std::shared_ptr< IntervalType > > |
template<typename IntervalType = Interval> | |
IteratorRange< IntervalIterator< IntervalType > > | Intervals () |
Get range of intervals with mutative access. More... | |
template<typename IntervalType = const Interval> | |
auto | Intervals () const -> std::enable_if_t< std::is_const_v< IntervalType >, IteratorRange< IntervalIterator< IntervalType > > > |
Get range of intervals with read-only access. More... | |
Public Member Functions inherited from PlayableSequence | |
~PlayableSequence () override | |
virtual const ChannelGroup * | FindChannelGroup () const =0 |
Find associated ChannelGroup if any. More... | |
virtual bool | GetSolo () const =0 |
May vary asynchronously. More... | |
virtual bool | GetMute () const =0 |
May vary asynchronously. More... | |
Public Member Functions inherited from WideSampleSequence | |
virtual | ~WideSampleSequence () |
virtual size_t | NChannels () const =0 |
A constant property. More... | |
virtual float | GetChannelGain (int channel) const =0 |
bool | GetFloats (size_t iChannel, size_t nBuffers, float *const buffers[], sampleCount start, size_t len, bool backwards=false, fillFormat fill=FillFormat::fillZero, bool mayThrow=true, sampleCount *pNumWithinClips=nullptr) const |
virtual bool | DoGet (size_t iChannel, size_t nBuffers, const samplePtr buffers[], sampleFormat format, sampleCount start, size_t len, bool backward, fillFormat fill=FillFormat::fillZero, bool mayThrow=true, sampleCount *pNumWithinClips=nullptr) const =0 |
virtual double | GetStartTime () const =0 |
virtual double | GetEndTime () const =0 |
virtual double | GetRate () const =0 |
sampleCount | TimeToLongSamples (double t0) const |
double | LongSamplesToTime (sampleCount pos) const |
double | SnapToSample (double t) const |
virtual sampleFormat | WidestEffectiveFormat () const =0 |
virtual bool | HasTrivialEnvelope () const =0 |
virtual void | GetEnvelopeValues (double *buffer, size_t bufferLen, double t0, bool backwards) const =0 |
Public Member Functions inherited from AudioGraph::Channel | |
virtual | ~Channel () |
virtual ChannelType | GetChannelType () const =0 |
Classify this channel. More... | |
Public Member Functions inherited from RecordableSequence | |
virtual | ~RecordableSequence () |
virtual sampleFormat | GetSampleFormat () const =0 |
virtual double | GetRate () const =0 |
virtual size_t | NChannels () const =0 |
A constant property. More... | |
virtual bool | Append (constSamplePtr buffer, sampleFormat format, size_t len, unsigned int stride, sampleFormat effectiveFormat, size_t iChannel=0)=0 |
Append the sample data to the track. You must call Flush() after the last Append. More... | |
bool | Append (constSamplePtr buffer, sampleFormat format, size_t len, size_t iChannel=0) |
virtual bool | IsLeader () const =0 |
virtual void | Flush ()=0 |
Flush of related leader must be called after last Append. More... | |
virtual void | InsertSilence (double t, double len)=0 |
Public Member Functions inherited from WaveChannel | |
~WaveChannel () override | |
WaveTrack & | GetTrack () |
const WaveTrack & | GetTrack () const |
WaveTrack & | ReallyGetTrack () |
TODO wide wave tracks – remove this. More... | |
const WaveTrack & | ReallyGetTrack () const |
TODO wide wave tracks – remove this. More... | |
auto | GetInterval (size_t iInterval) |
auto | GetInterval (size_t iInterval) const |
auto | Intervals () |
auto | Intervals () const |
bool | GetFloats (float *buffer, sampleCount start, size_t len, fillFormat fill=FillFormat::fillZero, bool mayThrow=true, sampleCount *pNumWithinClips=nullptr) const |
"narrow" overload fetches from the unique channel More... | |
ChannelSampleView | GetSampleView (double t0, double t1, bool mayThrow) const |
Request channel samples within [t0, t1), not knowing in advance how many this will be. More... | |
bool | Set (constSamplePtr buffer, sampleFormat format, sampleCount start, size_t len, sampleFormat effectiveFormat=widestSampleFormat) |
Random-access assignment of a range of samples. More... | |
bool | AppendBuffer (constSamplePtr buffer, sampleFormat format, size_t len, unsigned stride, sampleFormat effectiveFormat) |
bool | Append (constSamplePtr buffer, sampleFormat format, size_t len) |
std::pair< float, float > | GetMinMax (double t0, double t1, bool mayThrow=true) const |
float | GetRMS (double t0, double t1, bool mayThrow=true) const |
Get root-mean-square. More... | |
size_t | GetBestBlockSize (sampleCount t) const |
A hint for sizing of well aligned fetches. More... | |
size_t | GetIdealBlockSize () |
A hint for sizing of well aligned fetches. More... | |
size_t | GetMaxBlockSize () const |
bool | GetFloats (size_t iChannel, size_t nBuffers, float *const buffers[], sampleCount start, size_t len, bool backwards=false, fillFormat fill=FillFormat::fillZero, bool mayThrow=true, sampleCount *pNumWithinClips=nullptr) const |
Public Member Functions inherited from Channel | |
virtual | ~Channel () |
ChannelGroup & | GetChannelGroup () |
Channel object's lifetime is assumed to be nested in its Track's. More... | |
const ChannelGroup & | GetChannelGroup () const |
Channel object's lifetime is assumed to be nested in its Track's. More... | |
size_t | GetChannelIndex () const |
size_t | ReallyGetChannelIndex () const |
size_t | NIntervals () const |
Report the number of intervals. More... | |
template<typename IntervalType = Interval> | |
std::shared_ptr< IntervalType > | GetInterval (size_t iInterval) |
Retrieve an interval, cast to the given type. More... | |
template<typename IntervalType = const Interval> | |
auto | GetInterval (size_t iInterval) const -> std::enable_if_t< std::is_const_v< IntervalType >, std::shared_ptr< IntervalType > > |
template<typename IntervalType = Interval> | |
IteratorRange< IntervalIterator< IntervalType > > | Intervals () |
Get range of intervals with mutative access. More... | |
template<typename IntervalType = const Interval> | |
auto | Intervals () const -> std::enable_if_t< std::is_const_v< IntervalType >, IteratorRange< IntervalIterator< IntervalType > > > |
Get range of intervals with read-only access. More... | |
Static Public Member Functions | |
static wxString | GetDefaultAudioTrackNamePreference () |
static double | ProjectNyquistFrequency (const AudacityProject &project) |
static WaveTrack * | New (AudacityProject &project) |
static const TypeInfo & | ClassTypeInfo () |
Static Public Member Functions inherited from WritableSampleTrack | |
static const TypeInfo & | ClassTypeInfo () |
Static Public Member Functions inherited from SampleTrack | |
static const TypeInfo & | ClassTypeInfo () |
Static Public Member Functions inherited from PlayableTrack | |
static const TypeInfo & | ClassTypeInfo () |
Static Public Member Functions inherited from AudioTrack | |
static const TypeInfo & | ClassTypeInfo () |
Static Public Member Functions inherited from Track | |
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 Public Member Functions inherited from ClientData::Site< Host, ClientData, ObjectCopyingPolicy, Pointer, ObjectLockingPolicy, RegistryLockingPolicy > | |
static size_t | numFactories () |
How many static factories have been registered with this specialization of Site. More... | |
Private Member Functions | |
void | Init (const WaveTrack &orig) |
TrackListHolder | Clone (bool backup) const override |
wxString | MakeClipCopyName (const wxString &originalName) const |
wxString | MakeNewClipName () const |
void | FlushOne () |
void | HandleClear (double t0, double t1, bool addCutLines, bool split, bool clearByTrimming=false) |
void | ClearAndPasteAtSameTempo (double t0, double t1, const WaveTrack &src, bool preserve, bool merge, const TimeWarper *effectWarper, bool clearByTrimming) |
void | SplitAt (double t) |
void | ExpandOneCutLine (double cutLinePosition, double *cutlineStart, double *cutlineEnd) |
bool | MergeOneClipPair (int clipidx1, int clipidx2) |
void | ApplyPitchAndSpeedOnIntervals (const std::vector< IntervalHolder > &intervals, const ProgressReporter &reportProgress) |
void | InsertInterval (const IntervalHolder &interval) |
void | RemoveInterval (const IntervalHolder &interval) |
void | ReplaceInterval (const IntervalHolder &oldOne, const IntervalHolder &newOne) |
std::shared_ptr< WideChannelGroupInterval > | DoGetInterval (size_t iInterval) override |
Retrieve an interval. More... | |
std::shared_ptr<::Channel > | DoGetChannel (size_t iChannel) override |
Retrieve a channel. More... | |
ChannelGroup & | DoGetChannelGroup () const override |
Subclass must override. More... | |
ChannelGroup & | ReallyDoGetChannelGroup () const override |
This is temporary! It defaults to call the above. More... | |
void | DoSetRate (double newRate) |
void | SetClipRates (double newRate) |
void | DoOnProjectTempoChange (const std::optional< double > &oldTempo, double newTempo) override |
TrackListHolder | DuplicateWithOtherTempo (double newTempo, WaveTrack *&leader) const |
bool | GetOne (samplePtr buffer, sampleFormat format, sampleCount start, size_t len, bool backwards, fillFormat fill, bool mayThrow, sampleCount *pNumWithinClips) const |
size_t | GetFloatsFromTime (double t, size_t iChannel, float *buffer, size_t numSamples, bool mayThrow, PlaybackDirection direction) const |
Helper for GetFloatsCenteredAroundTime. If direction == PlaybackDirection::Backward , fetches samples to the left of t , excluding t , without reversing. More... | |
void | SetFloatsFromTime (double t, size_t iChannel, const float *buffer, size_t numSamples, sampleFormat effectiveFormat, PlaybackDirection direction) |
Similar to GetFloatsFromTime, but for writing. Sets as many samples as it can according to the same rules as GetFloatsFromTime. Leaves the other samples untouched. More... | |
void | DoSetPan (float value) |
void | DoSetGain (float value) |
void | PasteWaveTrack (double t0, const WaveTrack &other, bool merge) |
void | PasteWaveTrackAtSameTempo (double t0, const WaveTrack &other, bool merge) |
bool | RateConsistencyCheck () const |
Whether all clips of a leader track have a common rate. More... | |
bool | FormatConsistencyCheck () const |
Whether all tracks in group and all clips have a common sample format. More... | |
bool | InsertClip (WaveClipHolder clip, bool backup=false) |
Adds clip to the track. Clip should be not empty or to be a placeholder. More... | |
void | ApplyPitchAndSpeedOne (double t0, double t1, const ProgressReporter &reportProgress) |
Static Private Member Functions | |
static void | ClearAndPasteOne (WaveTrack &track, double t0, double t1, double startTime, double endTime, const WaveTrack &src, bool preserve, bool merge, const TimeWarper *effectWarper, bool clearByTrimming) |
static void | JoinOne (WaveTrack &track, double t0, double t1) |
static Holder | CopyOne (const WaveTrack &track, double t0, double t1, bool forClipboard) |
static void | WriteOneXML (const WaveTrack &track, XMLWriter &xmlFile, size_t iChannel, size_t nChannels) |
static bool | ReverseOne (WaveTrack &track, sampleCount start, sampleCount len, const ProgressReport &report={}) |
static bool | ReverseOneClip (WaveTrack &track, sampleCount start, sampleCount len, sampleCount originalStart, sampleCount originalEnd, const ProgressReport &report={}) |
static void | PasteOne (WaveTrack &track, double t0, const WaveTrack &other, double startTime, double insertDuration, bool merge=true) |
Private Attributes | |
WaveClipHolders | mClips |
int | mLegacyRate { 0 } |
used only during deserialization More... | |
sampleFormat | mLegacyFormat { undefinedSample } |
used only during deserialization More... | |
SampleBlockFactoryPtr | mpFactory |
wxCriticalSection | mFlushCriticalSection |
wxCriticalSection | mAppendCriticalSection |
double | mLegacyProjectFileOffset |
friend | WaveChannel |
Friends | |
class | WaveTrackFactory |
Additional Inherited Members | |
Protected Member Functions inherited from PlayableTrack | |
bool | DoGetMute () const |
void | DoSetMute (bool value) |
bool | DoGetSolo () const |
void | DoSetSolo (bool value) |
Protected Member Functions inherited from Track | |
void | SetLinkType (LinkType linkType, bool completeList=true) |
virtual void | DoOnProjectTempoChange (const std::optional< double > &oldTempo, double newTempo)=0 |
Protected Member Functions inherited from ClientData::Site< Host, ClientData, ObjectCopyingPolicy, Pointer, ObjectLockingPolicy, RegistryLockingPolicy > | |
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... | |
virtual std::shared_ptr< Channel > | DoGetChannel (size_t iChannel)=0 |
Retrieve a channel. More... | |
virtual std::shared_ptr< Interval > | DoGetInterval (size_t iInterval)=0 |
Retrieve an interval. More... | |
virtual ChannelGroup & | DoGetChannelGroup () const =0 |
Subclass must override. More... | |
virtual ChannelGroup & | ReallyDoGetChannelGroup () const |
This is temporary! It defaults to call the above. More... | |
Protected Attributes inherited from Track | |
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... | |
A Track that contains audio waveform data.
Definition at line 223 of file WaveTrack.h.
using WaveTrack::Holder = std::shared_ptr<WaveTrack> |
Definition at line 303 of file WaveTrack.h.
using WaveTrack::IntervalConstHolder = std::shared_ptr<const Interval> |
Definition at line 1027 of file WaveTrack.h.
using WaveTrack::IntervalHolder = std::shared_ptr<Interval> |
Definition at line 1026 of file WaveTrack.h.
using WaveTrack::ProgressReport = std::function<bool(double)> |
Argument is in (0, 1)
Definition at line 920 of file WaveTrack.h.
using WaveTrack::Regions = std::vector < Region > |
Definition at line 248 of file WaveTrack.h.
WaveTrack::WaveTrack | ( | const SampleBlockFactoryPtr & | pFactory, |
sampleFormat | format, | ||
double | rate | ||
) |
Definition at line 811 of file WaveTrack.cpp.
References DoSetRate(), anonymous_namespace{ExportPCM.cpp}::format, BasicUI::Get(), and mLegacyProjectFileOffset.
WaveTrack::WaveTrack | ( | const WaveTrack & | orig, |
ProtectedCreationArg && | a, | ||
bool | backup | ||
) |
Copied only in WaveTrack::Clone() !
Definition at line 821 of file WaveTrack.cpp.
References InsertClip(), mClips, mLegacyProjectFileOffset, and mpFactory.
|
virtual |
Definition at line 876 of file WaveTrack.cpp.
bool WaveTrack::AddClip | ( | const std::shared_ptr< WaveClip > & | clip | ) |
Append a clip to the track; to succeed, must have the same block factory as this track, and this->GetWidth() == clip->GetWidth()
; return success
clip != nullptr
this->GetWidth() == clip->GetWidth()
Definition at line 1935 of file WaveTrack.cpp.
References GetWidth(), and InsertClip().
Referenced by ClearAndPasteOne(), and ReverseOne().
|
overridevirtual |
If there is an existing WaveClip in the WaveTrack, then the data are appended to that clip. If there are no WaveClips in the track, then a new one is created.
Implements RecordableSequence.
Definition at line 2707 of file WaveTrack.cpp.
References TrackList::Channels(), anonymous_namespace{ExportPCM.cpp}::format, Track::GetOwner(), and anonymous_namespace{StretchingSequenceIntegrationTest.cpp}::iChannel.
Referenced by WaveChannel::Append(), and WaveChannel::AppendBuffer().
void WaveTrack::ApplyPitchAndSpeed | ( | std::optional< TimeInterval > | interval, |
ProgressReporter | reportProgress | ||
) |
Definition at line 2394 of file WaveTrack.cpp.
References ApplyPitchAndSpeedOnIntervals(), forward, GetClipAtTime(), GetEndTime(), GetIntervalAtTime(), GetNextInterval(), GetNumClips(), GetStartTime(), IsLeader(), min(), WideSampleSequence::SnapToSample(), Split(), and WaveClip::SplitsPlayRegion().
Referenced by Silence().
|
private |
|
private |
Definition at line 4139 of file WaveTrack.cpp.
References ReplaceInterval().
Referenced by ApplyPitchAndSpeed(), and Join().
bool WaveTrack::CanInsertClip | ( | const WaveClip & | clip, |
double & | slideBy, | ||
double | tolerance | ||
) | const |
Definition at line 3951 of file WaveTrack.cpp.
References WaveClip::GetPlayEndTime(), WaveClip::GetPlayStartTime(), mClips, and WideSampleSequence::SnapToSample().
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 3893 of file WaveTrack.cpp.
References CanOffsetClips(), and mClips.
Referenced by CanOffsetClips().
|
inline |
Definition at line 277 of file WaveTrack.h.
Referenced by EffectTruncSilence::Analyze(), CompareAudioCommand::Apply(), EffectTruncSilence::DoRemoval(), GetSampleView(), EffectLoudness::LoadBufferBlock(), PerTrackEffect::ProcessPass(), SetRate(), and EffectLoudness::StoreBufferBlock().
|
inline |
Definition at line 279 of file WaveTrack.h.
|
static |
Definition at line 999 of file WaveTrack.cpp.
References typeInfo().
|
overridevirtual |
Implements Track.
Definition at line 1479 of file WaveTrack.cpp.
References TrackList::Channels(), and IsLeader().
Referenced by Cut(), EffectTruncSilence::DoRemoval(), anonymous_namespace{LabelMenus.cpp}::OnCutLabels(), TrackSpectrumTransformer::PostProcess(), EffectStereoToMono::ProcessOne(), SyncLockAdjust(), and Trim().
void WaveTrack::ClearAndAddCutLine | ( | double | t0, |
double | t1 | ||
) |
May assume precondition: t0 <= t1
IsLeader()
Definition at line 1487 of file WaveTrack.cpp.
References TrackList::Channels(), and IsLeader().
Referenced by anonymous_namespace{LabelMenus.cpp}::OnCutLabels().
|
inline |
Overload that takes a TrackList and passes its first wave track
**src.Any<const WaveTrack>().begin()
satisfies preconditions of the other overload for src
Definition at line 439 of file WaveTrack.h.
References TrackList::Any().
void WaveTrack::ClearAndPaste | ( | double | t0, |
double | t1, | ||
const WaveTrack & | src, | ||
bool | preserve = true , |
||
bool | merge = true , |
||
const TimeWarper * | effectWarper = nullptr , |
||
bool | clearByTrimming = false |
||
) |
May assume precondition: t0 <= t1 If the source has one channel and this has more, then replicate source
IsLeader()
src.IsLeader()
src.NChannels() == 1 || src.NChannels() == NChannels()
Definition at line 1541 of file WaveTrack.cpp.
References ClearAndPasteAtSameTempo(), staffpad::vo::copy(), DuplicateWithOtherTempo(), Track::GetProjectTempo(), and THROW_INCONSISTENCY_EXCEPTION.
Referenced by EffectSBSMS::Finalize(), anonymous_namespace{EditMenus.cpp}::OnPaste(), and EffectNoiseRemoval::ProcessOne().
|
private |
Definition at line 1561 of file WaveTrack.cpp.
References TrackList::Channels(), ClearAndPasteOne(), GetEndTime(), Track::GetProjectTempo(), GetStartTime(), IsLeader(), min(), NChannels(), PasteWaveTrack(), and WideSampleSequence::SnapToSample().
Referenced by ClearAndPaste().
|
staticprivate |
Definition at line 1598 of file WaveTrack.cpp.
References AddClip(), GetClipIndex(), GetClips(), WaveClip::GetPlayEndTime(), WaveClip::GetPlayStartTime(), GetRate(), WaveClip::GetSequenceStartTime(), WaveClip::GetTrimLeft(), WaveClip::GetTrimRight(), GetWidth(), WaveClip::GetWidth(), HandleClear(), WaveClip::HasEqualPitchAndSpeed(), mClips, MergeOneClipPair(), mpFactory, WaveClip::Paste(), PasteOne(), WaveClip::SetSequenceStartTime(), WaveClip::SetTrimLeft(), WaveClip::SetTrimRight(), WaveClip::ShiftBy(), WideSampleSequence::SnapToSample(), SortedClipArray(), WideSampleSequence::TimeToLongSamples(), and TimeWarper::Warp().
Referenced by ClearAndPasteAtSameTempo().
|
overrideprivatevirtual |
Subclass responsibility implements only a part of Duplicate(), copying the track data proper (not associated data such as for groups and views)
unstretchInterval | If set, this time interval's stretching must be applied. |
!unstretchInterval.has_value() || unstretchInterval->first < unstretchInterval->second
IsLeader()
backup | whether the duplication is for backup purposes while opening a project, instead of other editing operations |
NChannels() == result->NChannels()
Implements Track.
Definition at line 1086 of file WaveTrack.cpp.
References TrackList::Channels(), Track::GetOwner(), IsLeader(), and TrackList::Temporary().
|
noexcept |
Should be called upon project close. Not balanced by unlocking calls.
IsLeader()
Definition at line 3024 of file WaveTrack.cpp.
References TrackList::Channels(), and IsLeader().
void WaveTrack::ConvertToSampleFormat | ( | sampleFormat | format, |
const std::function< void(size_t)> & | progressReport = {} |
||
) |
IsLeader()
Definition at line 1269 of file WaveTrack.cpp.
References TrackList::Channels(), anonymous_namespace{ExportPCM.cpp}::format, BasicUI::Get(), and IsLeader().
|
overridevirtual |
Create new tracks and don't modify this track.
IsLeader
result->NChannels() == NChannels()
Implements Track.
Definition at line 1408 of file WaveTrack.cpp.
References TrackList::Channels(), CopyOne(), TrackList::Create(), and THROW_INCONSISTENCY_EXCEPTION.
Referenced by Cut(), anonymous_namespace{LabelMenus.cpp}::OnCopyLabels(), anonymous_namespace{LabelMenus.cpp}::OnCutLabels(), anonymous_namespace{EditMenus.cpp}::OnSplitCut(), anonymous_namespace{EditMenus.cpp}::OnSplitNew(), and SplitCut().
void WaveTrack::CopyClipEnvelopes | ( | ) |
Definition at line 2788 of file WaveTrack.cpp.
References PackedArray::begin(), TrackList::Channels(), and PackedArray::end().
|
staticprivate |
Definition at line 1419 of file WaveTrack.cpp.
References GetEndTime(), GetRate(), GetSampleFormat(), InsertClip(), mClips, Track::SharedPointer(), and WaveClip::ShiftBy().
Referenced by Copy().
size_t WaveTrack::CountBlocks | ( | ) | const |
IsLeader()
Definition at line 1252 of file WaveTrack.cpp.
References TrackList::Channels(), and IsLeader().
WaveClip * WaveTrack::CreateClip | ( | double | offset = .0 , |
const wxString & | name = wxEmptyString |
||
) |
Create new clip and add it to this track.
Returns a pointer to the newly created clip. Optionally initial offset and clip name may be provided
result->GetWidth() == GetWidth()
Definition at line 3801 of file WaveTrack.cpp.
References Track::GetProjectTempo(), GetRate(), GetSampleFormat(), GetWaveColorIndex(), GetWidth(), mClips, mpFactory, and name.
Referenced by AUPImportFileHandle::HandleWaveClip(), JoinOne(), NewestOrNewClip(), and RightmostOrNewClip().
void WaveTrack::CreateWideClip | ( | double | offset = .0 , |
const wxString & | name = wxEmptyString |
||
) |
Definition at line 3794 of file WaveTrack.cpp.
References TrackList::Channels(), IsLeader(), and name.
|
overridevirtual |
Create tracks and modify this track.
IsLeader()
result->NChannels() == NChannels()
Implements Track.
Definition at line 1303 of file WaveTrack.cpp.
References Clear(), Copy(), IsLeader(), and THROW_INCONSISTENCY_EXCEPTION.
void WaveTrack::DiscardTrimmed | ( | ) |
Remove hidden audio from all clips.
IsLeader()
Definition at line 4432 of file WaveTrack.cpp.
References TrackList::Channels(), and IsLeader().
void WaveTrack::Disjoin | ( | double | t0, |
double | t1 | ||
) |
IsLeader()
Definition at line 2520 of file WaveTrack.cpp.
References PackedArray::end(), floatSample, Intervals(), IsLeader(), limitSampleBufferSize(), min(), NChannels(), SplitDelete(), WideSampleSequence::TimeToLongSamples(), and WAVETRACK_MERGE_POINT_TOLERANCE.
Referenced by anonymous_namespace{LabelMenus.cpp}::OnDisjoinLabels().
|
overridevirtual |
This fails if any clip overlapping the range has non-unit stretch ratio!
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.
an un-owned track should have reported one channel only
Implements WideSampleSequence.
Definition at line 3176 of file WaveTrack.cpp.
References TrackList::Channels(), anonymous_namespace{ExportPCM.cpp}::format, Track::GetOwner(), anonymous_namespace{StretchingSequenceIntegrationTest.cpp}::iChannel, IsLeader(), and NChannels().
|
overrideprivatevirtual |
Retrieve a channel.
!(iChannel < NChannels()) || result
Implements ChannelGroup.
Definition at line 1057 of file WaveTrack.cpp.
References TrackList::Channels(), anonymous_namespace{StretchingSequenceIntegrationTest.cpp}::iChannel, and NChannels().
|
overrideprivatevirtual |
Subclass must override.
ii
less than result.NChannels()
, this == result.GetChannel(ii).get()
Implements Channel.
Definition at line 1071 of file WaveTrack.cpp.
|
overrideprivatevirtual |
Retrieve an interval.
!(iInterval < NIntervals()) || result
Implements ChannelGroup.
Definition at line 1031 of file WaveTrack.cpp.
References mClips, and NIntervals().
|
overrideprivatevirtual |
IsLeader()
Implements Track.
Definition at line 893 of file WaveTrack.cpp.
References TrackList::Channels(), and IsLeader().
|
private |
Definition at line 1160 of file WaveTrack.cpp.
References BasicUI::Get().
Referenced by HandleXMLTag(), and SetGain().
|
private |
Definition at line 1178 of file WaveTrack.cpp.
References BasicUI::Get().
Referenced by HandleXMLTag(), and SetPan().
|
private |
Definition at line 1143 of file WaveTrack.cpp.
References BasicUI::Get().
Referenced by Resample(), SetRate(), and WaveTrack().
|
private |
IsLeader()
[out] | leader |
pre IsLeader()
Definition at line 903 of file WaveTrack.cpp.
References Track::Any(), PackedArray::begin(), Track::Duplicate(), and Track::OnProjectTempoChange().
Referenced by ClearAndPaste(), and PasteWaveTrack().
WaveTrack::Holder WaveTrack::EmptyCopy | ( | const SampleBlockFactoryPtr & | pFactory = {} , |
bool | keepLink = true |
||
) | const |
Make another track copying format, rate, color, etc. but containing no clips; and always with a unique channel
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 1366 of file WaveTrack.cpp.
References BasicUI::Get(), GetRate(), GetSampleFormat(), mpFactory, and ChannelGroup::None.
Referenced by WaveTrackFactory::Create(), PasteInto(), EffectNoiseRemoval::ProcessOne(), and EffectStereoToMono::ProcessOne().
void WaveTrack::ExpandCutLine | ( | double | cutLinePosition, |
double * | cutlineStart = nullptr , |
||
double * | cutlineEnd = nullptr |
||
) |
Expand cut line (that is, re-insert audio, then delete audio saved in cut line)
Definition at line 4025 of file WaveTrack.cpp.
References TrackList::Channels(), and IsLeader().
|
private |
Definition at line 4037 of file WaveTrack.cpp.
References BadUserAction, PackedArray::end(), GetEditClipsCanMove(), mClips, and XO().
|
overridevirtual |
Find associated ChannelGroup if any.
Implements PlayableSequence.
Definition at line 2825 of file WaveTrack.cpp.
const WaveClip * WaveTrack::FindClipByName | ( | const wxString & | name | ) | const |
Returns nullptr if clip with such name was not found.
Definition at line 1047 of file WaveTrack.cpp.
Referenced by MakeClipCopyName(), and MakeNewClipName().
|
overridevirtual |
Implements RecordableSequence.
Definition at line 2776 of file WaveTrack.cpp.
References TrackList::Channels(), and IsLeader().
Referenced by WaveTrackSink::Flush(), TrackSpectrumTransformer::PostProcess(), and EffectSBSMS::Process().
|
private |
Definition at line 2814 of file WaveTrack.cpp.
References WaveClip::Flush(), and RightmostOrNewClip().
|
private |
Whether all tracks in group and all clips have a common sample format.
IsLeader()
Definition at line 2370 of file WaveTrack.cpp.
References TrackList::Channels(), and IsLeader().
Referenced by LinkConsistencyFix().
WaveClip * WaveTrack::GetAdjacentClip | ( | const WaveClip & | clip, |
PlaybackDirection | searchDirection | ||
) |
Similar to GetNextClip, but returns nullptr
if the neighbour clip is not adjacent.
Definition at line 3716 of file WaveTrack.cpp.
const WaveClip * WaveTrack::GetAdjacentClip | ( | const WaveClip & | clip, |
PlaybackDirection | searchDirection | ||
) | const |
Similar to GetNextClip, but returns nullptr
if the neighbour clip is not adjacent.
Definition at line 3697 of file WaveTrack.cpp.
References forward, GetNextClip(), WaveClip::GetPlayEndTime(), and WaveClip::GetPlayStartTime().
Referenced by GetFloatsFromTime(), and SetFloatsFromTime().
|
inline |
Definition at line 794 of file WaveTrack.h.
|
inline |
Definition at line 799 of file WaveTrack.h.
size_t WaveTrack::GetBestBlockSize | ( | sampleCount | t | ) | const |
Definition at line 2721 of file WaveTrack.cpp.
References GetMaxBlockSize(), and mClips.
Referenced by WaveChannel::GetBestBlockSize(), EffectNoiseRemoval::ProcessOne(), ReverseOneClip(), VoiceKey::TestDirectionChanges(), VoiceKey::TestEnergy(), and VoiceKey::TestSignChanges().
|
inline |
Definition at line 272 of file WaveTrack.h.
References anonymous_namespace{StretchingSequenceIntegrationTest.cpp}::iChannel.
Referenced by WaveTrackMenuTable::OnMergeStereo(), and WaveTrackMenuTable::SplitStereo().
|
inline |
Definition at line 274 of file WaveTrack.h.
References anonymous_namespace{StretchingSequenceIntegrationTest.cpp}::iChannel.
|
overridevirtual |
Takes gain and pan into account.
Implements WideSampleSequence.
Definition at line 1196 of file WaveTrack.cpp.
References GetGain(), and GetPan().
Referenced by EffectStereoToMono::ProcessOne().
|
overridevirtual |
Classify this channel.
Implements AudioGraph::Channel.
Definition at line 847 of file WaveTrack.cpp.
References IsLeader(), AudioGraph::LeftChannel, AudioGraph::MonoChannel, TrackList::NChannels(), and AudioGraph::RightChannel.
WaveClip * WaveTrack::GetClipAtTime | ( | double | time | ) |
Definition at line 3724 of file WaveTrack.cpp.
const WaveClip * WaveTrack::GetClipAtTime | ( | double | time | ) | const |
Definition at line 3759 of file WaveTrack.cpp.
References SortedClipArray().
Referenced by anonymous_namespace{SampleHandle.cpp}::adjustTime(), ApplyPitchAndSpeed(), SelectHandle::Click(), GetFloatAtTime(), GetFloatsFromTime(), PasteOne(), anonymous_namespace{WaveTrack.cpp}::RoundToNearestClipSample(), SetFloatsFromTime(), and SetFloatsWithinTimeRange().
WaveClip * WaveTrack::GetClipByIndex | ( | int | index | ) |
Get the nth clip in this WaveTrack (will return nullptr if not found).
Use this only in special cases (like getting the linked clip), because it is much slower than GetClipIterator().
Definition at line 3859 of file WaveTrack.cpp.
References mClips.
Referenced by GetClipByIndex(), MergeOneClipPair(), and PasteOne().
const WaveClip * WaveTrack::GetClipByIndex | ( | int | index | ) | const |
Get the nth clip in this WaveTrack (will return nullptr if not found).
Use this only in special cases (like getting the linked clip), because it is much slower than GetClipIterator().
Definition at line 3867 of file WaveTrack.cpp.
References GetClipByIndex().
int WaveTrack::GetClipIndex | ( | const WaveClip * | clip | ) | const |
Definition at line 3852 of file WaveTrack.cpp.
References anonymous_namespace{WaveTrack.cpp}::FindClip(), and mClips.
Referenced by ClearAndPasteOne().
ClipHolders WaveTrack::GetClipInterfaces | ( | ) | const |
Get access to the (visible) clips in the tracks, in unspecified order.
IsLeader()
Definition at line 3056 of file WaveTrack.cpp.
References TrackList::Channels(), Track::GetOwner(), IsLeader(), mClips, and NChannels().
|
inline |
Get access to the (visible) clips in the tracks, in unspecified order (not necessarily sequenced in time).
Definition at line 699 of file WaveTrack.h.
Referenced by ClearAndPasteOne(), WaveTrackUtilities::HasPitchOrSpeed(), EffectAutoDuck::Process(), and ReverseOne().
|
inline |
Get access to the (visible) clips in the tracks, in unspecified order (not necessarily sequenced in time).
Definition at line 703 of file WaveTrack.h.
WaveClipConstHolders WaveTrack::GetClipsIntersecting | ( | double | t0, |
double | t1 | ||
) | const |
Definition at line 3742 of file WaveTrack.cpp.
References mClips.
Referenced by anonymous_namespace{EditMenus.cpp}::JoinClipsAvailableFlag(), and SelectActions::Handler::OnZeroCrossing().
|
static |
Definition at line 743 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 |
Implement WideSampleSequence.
Implements WideSampleSequence.
Definition at line 3092 of file WaveTrack.cpp.
References ChannelGroup::GetEndTime().
Referenced by AUPImportFileHandle::AddSilence(), EffectTruncSilence::Analyze(), ApplyPitchAndSpeed(), ClearAndPasteAtSameTempo(), CopyOne(), Effect::GetBounds(), PasteWaveTrackAtSameTempo(), TrackSpectrumTransformer::PostProcess(), EffectStereoToMono::ProcessOne(), GetInfoCommand::SendTracks(), RateMenuTable::SetRate(), SyncLockAdjust(), and Trim().
Envelope * WaveTrack::GetEnvelopeAtTime | ( | double | time | ) |
Definition at line 3781 of file WaveTrack.cpp.
References TrackList::Channels(), WaveClip::GetEnvelope(), and Track::GetOwner().
|
overridevirtual |
Fetch envelope values corresponding to uniformly separated sample times starting at the given time
backwards | if true, fetch values in reverse order, from t0 to t0 - bufferLen / rate |
Implements WideSampleSequence.
Definition at line 3621 of file WaveTrack.cpp.
References TrackList::Channels(), Track::GetOwner(), GetRate(), limitSampleBufferSize(), and min().
|
overridevirtual |
Returns nonempty if an error was encountered while trying to open the track from XML
May assume consistency of stereo channel grouping and examine other channels
IsLeader()
Reimplemented from Track.
Definition at line 3012 of file WaveTrack.cpp.
References TrackList::Channels(), IsLeader(), and XO().
bool WaveTrack::GetFloatAtTime | ( | double | t, |
size_t | iChannel, | ||
float & | value, | ||
bool | mayThrow | ||
) | const |
GetClipAtTime(t) != nullptr
, false otherwise. Definition at line 3309 of file WaveTrack.cpp.
References GetClipAtTime(), and anonymous_namespace{StretchingSequenceIntegrationTest.cpp}::iChannel.
|
inline |
"narrow" overload fetches first channel only
Definition at line 46 of file SampleTrack.h.
Referenced by VoiceKey::OffBackward(), VoiceKey::OffForward(), VoiceKey::OnBackward(), VoiceKey::OnForward(), ReverseOneClip(), SelectHandle::StartSnappingFreqSelection(), VoiceKey::TestDirectionChanges(), VoiceKey::TestEnergy(), and VoiceKey::TestSignChanges().
bool WideSampleSequence::GetFloats | ( | size_t | iChannel, |
size_t | nBuffers, | ||
float *const | buffers[], | ||
sampleCount | start, | ||
size_t | len, | ||
bool | backwards = false , |
||
fillFormat | fill = FillFormat::fillZero , |
||
bool | mayThrow = true , |
||
sampleCount * | pNumWithinClips = nullptr |
||
) | const |
Retrieve samples from a sequence in floating-point format, regardless of the storage format
iChannel | index of first channel to fetch | |
nBuffers | counts buffers | |
buffers | receive the samples | |
start | starting sample, relative to absolute time zero | |
len | how many samples to get. buffers are assumed sufficiently large | |
fill | how to assign values for sample positions between clips | |
mayThrow | if false, fill buffer with zeros when there is failure to retrieve samples; else throw | |
[out] | pNumWithinClips | Report how many samples were copied from within clips, rather than filled according to fillFormat; but these were not necessarily one contiguous range. |
iChannel + nBuffers <= NChannels()
mayThrow
is false and not all samples could be retrieved Definition at line 43 of file WideSampleSequence.cpp.
std::pair< size_t, size_t > WaveTrack::GetFloatsCenteredAroundTime | ( | double | t, |
size_t | iChannel, | ||
float * | buffer, | ||
size_t | numSideSamples, | ||
bool | mayThrow | ||
) | const |
Gets as many samples as it can, but no more than 2 * numSideSamples + 1
, centered around t
. Reads nothing if GetClipAtTime(t) == nullptr
. Useful to access samples across clip boundaries, as it spreads the read to adjacent clips, i.e., not separated by silence from clip at t
.
Definition at line 3217 of file WaveTrack.cpp.
References backward, forward, GetFloatsFromTime(), and anonymous_namespace{StretchingSequenceIntegrationTest.cpp}::iChannel.
|
private |
Helper for GetFloatsCenteredAroundTime. If direction == PlaybackDirection::Backward
, fetches samples to the left of t
, excluding t
, without reversing.
Definition at line 3285 of file WaveTrack.cpp.
References floatSample, forward, GetAdjacentClip(), GetClipAtTime(), anonymous_namespace{WaveTrack.cpp}::GetSampleAccessArgs(), anonymous_namespace{StretchingSequenceIntegrationTest.cpp}::iChannel, and anonymous_namespace{WaveTrack.cpp}::RoundToNearestClipSample().
Referenced by GetFloatsCenteredAroundTime().
float WaveTrack::GetGain | ( | ) | const |
Definition at line 1155 of file WaveTrack.cpp.
References BasicUI::Get().
Referenced by WaveTrackControls::GainSlider(), GetChannelGain(), GetInfoCommand::SendTracks(), SetGain(), and WriteOneXML().
size_t WaveTrack::GetIdealBlockSize | ( | ) |
Definition at line 2763 of file WaveTrack.cpp.
References Sequence::GetIdealBlockSize(), WaveClip::GetSequence(), and NewestOrNewClip().
Referenced by WaveChannel::GetIdealBlockSize().
WaveTrack::IntervalHolder WaveTrack::GetIntervalAtTime | ( | double | t | ) |
Definition at line 563 of file WaveTrack.cpp.
References Intervals().
Referenced by ApplyPitchAndSpeed().
const WaveClip * WaveTrack::GetLeftmostClip | ( | ) | const |
Definition at line 3034 of file WaveTrack.cpp.
References mClips.
Referenced by PasteOne().
size_t WaveTrack::GetMaxBlockSize | ( | ) | const |
Definition at line 2741 of file WaveTrack.cpp.
References GetMaxBlockSize(), GetSampleFormat(), mClips, and mpFactory.
Referenced by EffectTruncSilence::Analyze(), CompareAudioCommand::Apply(), GetBestBlockSize(), WaveChannel::GetMaxBlockSize(), GetMaxBlockSize(), EffectCompressor::InitPass1(), EffectNoiseRemoval::ProcessOne(), EffectStereoToMono::ProcessOne(), PerTrackEffect::ProcessPass(), ReverseOneClip(), VoiceKey::TestDirectionChanges(), VoiceKey::TestEnergy(), and VoiceKey::TestSignChanges().
|
overridevirtual |
May vary asynchronously.
Implements PlayableSequence.
Definition at line 2830 of file WaveTrack.cpp.
References PlayableTrack::GetMute().
Referenced by ExportAudioDialog::DoExportSplitByTracks(), ExportUtils::FindExportWaveTracks(), anonymous_namespace{ExportAudioDialog.cpp}::GetNumExportChannels(), GetInfoCommand::SendTracks(), and ExportAudioDialog::UpdateTrackExportSettings().
WaveClip * WaveTrack::GetNextClip | ( | const WaveClip & | clip, |
PlaybackDirection | searchDirection | ||
) |
Returns clips next to clip
in the given direction, or nullptr
if there is none.
Definition at line 3753 of file WaveTrack.cpp.
const WaveClip * WaveTrack::GetNextClip | ( | const WaveClip & | clip, |
PlaybackDirection | searchDirection | ||
) | const |
Returns clips next to clip
in the given direction, or nullptr
if there is none.
Definition at line 3729 of file WaveTrack.cpp.
References forward, and SortedClipArray().
Referenced by GetAdjacentClip(), and SetFloatsWithinTimeRange().
WaveTrack::IntervalHolder WaveTrack::GetNextInterval | ( | const Interval & | interval, |
PlaybackDirection | searchDirection | ||
) |
Definition at line 556 of file WaveTrack.cpp.
std::shared_ptr< const WaveTrack::Interval > WaveTrack::GetNextInterval | ( | const Interval & | interval, |
PlaybackDirection | searchDirection | ||
) | const |
Definition at line 534 of file WaveTrack.cpp.
References backward, forward, Intervals(), and ChannelGroupInterval::Start().
Referenced by ApplyPitchAndSpeed(), anonymous_namespace{WaveClipAdjustBorderHandle.cpp}::GetLeftAdjustLimit(), anonymous_namespace{WaveClipAdjustBorderHandle.cpp}::GetRightAdjustLimit(), and WaveTrackUtilities::SetClipStretchRatio().
int WaveTrack::GetNumClips | ( | ) | const |
Definition at line 3872 of file WaveTrack.cpp.
References mClips.
Referenced by ApplyPitchAndSpeed(), and PasteOne().
int WaveTrack::GetNumClips | ( | double | t0, |
double | t1 | ||
) | const |
Definition at line 3877 of file WaveTrack.cpp.
References SortedClipArray().
|
private |
Definition at line 3401 of file WaveTrack.cpp.
References ClearSamples(), fillTwo, fillZero, floatSample, anonymous_namespace{ExportPCM.cpp}::format, mClips, min(), ReverseSamples(), SAMPLE_SIZE, and wxT().
float WaveTrack::GetPan | ( | ) | const |
Definition at line 1173 of file WaveTrack.cpp.
References BasicUI::Get().
Referenced by GetChannelGain(), WaveTrackControls::PanSlider(), GetInfoCommand::SendTracks(), SetPan(), and WriteOneXML().
|
overridevirtual |
Implements RecordableSequence.
Definition at line 1128 of file WaveTrack.cpp.
References BasicUI::Get().
Referenced by ProjectFileManager::AddImportedTracks(), SelectHandle::AdjustFreqSelection(), EffectTruncSilence::Analyze(), VoiceKey::CalibrateNoise(), ClearAndPasteOne(), CopyOne(), CreateClip(), SpectrumVRulerControls::DoHandleWheelRotation(), SpectrumVZoomHandle::DoZoom(), WaveformVZoomHandle::DoZoom(), EmptyCopy(), SpectrogramBounds::GetBounds(), GetEnvelopeValues(), anonymous_namespace{WaveClipAdjustBorderHandle.cpp}::GetLeftAdjustLimit(), anonymous_namespace{WaveClipAdjustBorderHandle.cpp}::GetRightAdjustLimit(), TranscriptionToolBar::GetSamples(), InsertSilence(), JoinOne(), SelectHandle::MoveSnappingFreqSelection(), VoiceKey::OffBackward(), VoiceKey::OffForward(), VoiceKey::OnBackward(), VoiceKey::OnForward(), WaveTrackMenuTable::OnMergeStereo(), PasteOne(), anonymous_namespace{BrushHandle.cpp}::PositionToFrequency(), anonymous_namespace{SelectHandle.cpp}::PositionToFrequency(), EffectPaulstretch::ProcessOne(), EffectStereoToMono::ProcessOne(), SpectralDataManager::Worker::ProcessOvertones(), PerTrackEffect::ProcessPass(), SpectralDataManager::Worker::ProcessSnapping(), ProjectNyquistFrequency(), SelectHandle::SnapCenterOnce(), SelectHandle::StartSnappingFreqSelection(), anonymous_namespace{WaveTrackControls.cpp}::Status1DrawFunction(), SyncLockAdjust(), and WriteOneXML().
const WaveClip * WaveTrack::GetRightmostClip | ( | ) | const |
Definition at line 3045 of file WaveTrack.cpp.
References mClips.
Referenced by ProjectAudioManager::DoRecord(), and PasteOne().
|
overridevirtual |
Implements RecordableSequence.
Definition at line 1263 of file WaveTrack.cpp.
References BasicUI::Get().
Referenced by CopyOne(), CreateClip(), EmptyCopy(), GetMaxBlockSize(), InsertSilence(), WaveTrackMenuTable::OnMergeStereo(), SyncLockAdjust(), and WriteOneXML().
ChannelGroupSampleView WaveTrack::GetSampleView | ( | double | t0, |
double | t1, | ||
bool | mayThrow = true |
||
) | const |
Request samples within [t0, t1), not knowing in advance how many this will be.
The stretching of intersecting intervals influences the number of samples fitting into [t0, t1), i.e., half as many for twice as large a stretch ratio, due to a larger spacing of the raw samples.
IsLeader()
result.size() == NChannels()
size_t
Definition at line 3492 of file WaveTrack.cpp.
References Channels(), and IsLeader().
sampleCount WaveTrack::GetSequenceSamplesCount | ( | ) | const |
IsLeader()
Definition at line 1240 of file WaveTrack.cpp.
References TrackList::Channels(), and IsLeader().
|
overridevirtual |
May vary asynchronously.
Implements PlayableSequence.
Definition at line 2835 of file WaveTrack.cpp.
References PlayableTrack::GetSolo().
Referenced by ExportAudioDialog::DoExportSplitByTracks(), ExportUtils::FindExportWaveTracks(), anonymous_namespace{ExportAudioDialog.cpp}::GetNumExportChannels(), GetInfoCommand::SendTracks(), and ExportAudioDialog::UpdateTrackExportSettings().
|
overridevirtual |
Implement WideSampleSequence.
Implements WideSampleSequence.
Definition at line 3087 of file WaveTrack.cpp.
References ChannelGroup::GetStartTime().
Referenced by ApplyPitchAndSpeed(), ClearAndPasteAtSameTempo(), Effect::GetBounds(), TranscriptionToolBar::GetSamples(), MoveTo(), PasteWaveTrackAtSameTempo(), EffectStereoToMono::ProcessOne(), GetInfoCommand::SendTracks(), and Trim().
|
overridevirtual |
Reimplemented from WritableSampleTrack.
Definition at line 994 of file WaveTrack.cpp.
References typeInfo().
sampleCount WaveTrack::GetVisibleSampleCount | ( | ) | const |
Definition at line 1230 of file WaveTrack.cpp.
References mClips.
int WaveTrack::GetWaveColorIndex | ( | ) | const |
Definition at line 1214 of file WaveTrack.cpp.
References BasicUI::Get().
Referenced by CreateClip(), HandleXMLChild(), InsertSilence(), and WriteOneXML().
size_t WaveTrack::GetWidth | ( | ) | const |
The width of every WaveClip in this track; for now always 1.
Definition at line 831 of file WaveTrack.cpp.
Referenced by AddClip(), ClearAndPasteOne(), and CreateClip().
|
private |
Definition at line 1952 of file WaveTrack.cpp.
References anonymous_namespace{WaveTrack.cpp}::FindClip(), GetEditClipsCanMove(), InsertClip(), mClips, mpFactory, WideSampleSequence::SnapToSample(), and THROW_INCONSISTENCY_EXCEPTION.
Referenced by ClearAndPasteOne().
|
overridevirtual |
Implements XMLTagHandler.
Definition at line 2907 of file WaveTrack.cpp.
References XMLMethodRegistry< Host >::Get(), WaveClip::GetEnvelope(), WaveClip::GetSequence(), GetWaveColorIndex(), mClips, mLegacyFormat, mLegacyProjectFileOffset, mLegacyRate, mpFactory, NewestOrNewClip(), and WaveClip::SetSequenceStartTime().
|
override |
Definition at line 2895 of file WaveTrack.cpp.
References WaveClip::HandleXMLEndTag(), and NewestOrNewClip().
|
overridevirtual |
Implements XMLTagHandler.
Definition at line 2840 of file WaveTrack.cpp.
References DoSetGain(), DoSetPan(), BasicUI::Get(), Track::HandleCommonXMLAttribute(), PlayableTrack::HandleXMLAttribute(), Sequence::IsValidSampleFormat(), lrint, mLegacyProjectFileOffset, mLegacyRate, SetLegacyFormat(), Track::SetLinkType(), and anonymous_namespace{WaveTrack.cpp}::ToLinkType().
bool WaveTrack::HasHiddenData | ( | ) | const |
Whether any clips have hidden audio.
IsLeader()
Definition at line 4422 of file WaveTrack.cpp.
References TrackList::Channels(), and IsLeader().
|
overridevirtual |
Implements WideSampleSequence.
Definition at line 3610 of file WaveTrack.cpp.
References TrackList::Channels(), and Track::GetOwner().
|
private |
Definition at line 859 of file WaveTrack.cpp.
References Track::Init(), and mpFactory.
|
private |
Adds clip to the track. Clip should be not empty or to be a placeholder.
Sets project tempo on clip upon push. Use this instead of mClips.push_back
backup | whether the duplication is for backup purposes while opening a project, instead of other editing operations |
Definition at line 2381 of file WaveTrack.cpp.
References Track::GetProjectTempo(), and mClips.
Referenced by AddClip(), CopyOne(), HandleClear(), PasteOne(), SplitAt(), and WaveTrack().
|
private |
IsLeader()
Definition at line 4158 of file WaveTrack.cpp.
References TrackList::Channels(), and IsLeader().
Referenced by ReplaceInterval().
|
overridevirtual |
Implements RecordableSequence.
Definition at line 2477 of file WaveTrack.cpp.
References TrackList::Channels(), PackedArray::end(), GetRate(), GetSampleFormat(), GetWaveColorIndex(), IsLeader(), mpFactory, and THROW_INCONSISTENCY_EXCEPTION.
Referenced by AUPImportFileHandle::AddSilence().
|
inline |
Definition at line 1041 of file WaveTrack.h.
Referenced by ProjectFileManager::AddImportedTracks(), SetClipCommand::Apply(), Disjoin(), GetIntervalAtTime(), GetNextInterval(), Join(), and WaveTrackMenuTable::OnMergeStereo().
|
inline |
Definition at line 1042 of file WaveTrack.h.
bool WaveTrack::IsEmpty | ( | double | t0, |
double | t1 | ||
) | const |
Returns true if there are no WaveClips in the specified region.
Definition at line 1281 of file WaveTrack.cpp.
References mClips.
Referenced by PasteOne(), and SyncLockAdjust().
|
overridevirtual |
Implements RecordableSequence.
Definition at line 2820 of file WaveTrack.cpp.
References Track::IsLeader().
Referenced by AUPImportFileHandle::AddSilence(), EffectTruncSilence::Analyze(), ApplyPitchAndSpeed(), Clear(), ClearAndAddCutLine(), ClearAndPasteAtSameTempo(), Clone(), CloseLock(), ConvertToSampleFormat(), CountBlocks(), CreateWideClip(), Cut(), DEFINE_ATTACHED_VIRTUAL_OVERRIDE(), DiscardTrimmed(), Disjoin(), SpectrumView::DoDraw(), WaveformView::DoDraw(), DoGet(), DoOnProjectTempoChange(), EffectTruncSilence::DoRemoval(), ExpandCutLine(), EffectSBSMS::Finalize(), Flush(), FormatConsistencyCheck(), Effect::GetBounds(), GetChannelType(), GetClipInterfaces(), GetErrorOpening(), GetSampleView(), GetSequenceSamplesCount(), HasHiddenData(), InsertInterval(), InsertSilence(), Join(), LinkConsistencyFix(), MoveTo(), NChannels(), Paste(), PasteInto(), PasteWaveTrackAtSameTempo(), TrackSpectrumTransformer::PostProcess(), RateConsistencyCheck(), Reinit(), RemoveCutLine(), RemoveInterval(), ReplaceInterval(), SetWaveColorIndex(), Silence(), Split(), SplitCut(), SplitDelete(), SyncLockAdjust(), Trim(), and WideEmptyCopy().
void WaveTrack::Join | ( | double | t0, |
double | t1, | ||
const ProgressReporter & | reportProgress | ||
) |
IsLeader()
Definition at line 2608 of file WaveTrack.cpp.
References ApplyPitchAndSpeedOnIntervals(), TrackList::Channels(), Intervals(), IsLeader(), and JoinOne().
Referenced by anonymous_namespace{LabelMenus.cpp}::OnJoinLabels().
|
staticprivate |
Definition at line 2631 of file WaveTrack.cpp.
References CreateClip(), PackedArray::end(), anonymous_namespace{WaveTrack.cpp}::FindClip(), Track::GetName(), WaveClip::GetPlayStartTime(), GetRate(), and mClips.
Referenced by Join().
|
overridevirtual |
Check consistency of channel groups, and maybe fix it.
doFix | whether to make any changes to correct inconsistencies |
!doFix || IsLeader()
Reimplemented from Track.
Definition at line 911 of file WaveTrack.cpp.
References ChannelGroup::Aligned, anonymous_namespace{WaveTrack.cpp}::AreAligned(), TrackList::Channels(), FormatConsistencyCheck(), BasicUI::Get(), Track::GetLinkType(), Track::GetName(), IsLeader(), Track::LinkConsistencyFix(), mClips, mLegacyFormat, mLegacyRate, ChannelGroup::None, RateConsistencyCheck(), Track::SetLinkType(), SetRate(), SortedClipArray(), and undefinedSample.
|
private |
Definition at line 1104 of file WaveTrack.cpp.
References FindClipByName(), name, and XC.
Referenced by PasteOne().
|
private |
Definition at line 1116 of file WaveTrack.cpp.
References FindClipByName(), Track::GetName(), name, and XC.
Referenced by NewestOrNewClip(), PasteOne(), and RightmostOrNewClip().
bool WaveTrack::MergeClips | ( | int | clipidx1, |
int | clipidx2 | ||
) |
Definition at line 4106 of file WaveTrack.cpp.
References TrackList::Channels().
|
private |
Definition at line 4115 of file WaveTrack.cpp.
References anonymous_namespace{WaveTrack.cpp}::FindClip(), GetClipByIndex(), WaveClip::GetPlayEndTime(), WaveClip::HasEqualPitchAndSpeed(), mClips, and WaveClip::Paste().
Referenced by ClearAndPasteOne().
TrackListHolder WaveTrack::MonoToStereo | ( | ) |
Definition at line 1398 of file WaveTrack.cpp.
References Track::Duplicate(), and Track::GetOwner().
|
overridevirtual |
Implements ChannelGroup.
Definition at line 881 of file WaveTrack.cpp.
References TrackList::Channels(), BasicUI::Get(), GetStartTime(), and IsLeader().
|
overridevirtual |
May report more than one only when this is a leader track.
Implements RecordableSequence.
Definition at line 836 of file WaveTrack.cpp.
References Track::GetOwner(), IsLeader(), and TrackList::NChannels().
Referenced by WaveTrack::Interval::Append(), ProjectAudioManager::ChooseExistingRecordingTracks(), ClearAndPasteAtSameTempo(), WaveTrack::Interval::ClearLeft(), WaveTrack::Interval::ClearRight(), EffectBase::CountWaveTracks(), DEFINE_ATTACHED_VIRTUAL_OVERRIDE(), Disjoin(), DoGet(), WaveTrack::Interval::DoGetChannel(), DoGetChannel(), anonymous_namespace{TrackMenus.cpp}::DoMixAndRender(), EffectSBSMS::Finalize(), WaveTrack::Interval::ForEachClip(), GetClipInterfaces(), WaveTrack::Interval::GetRenderedCopy(), PasteWaveTrackAtSameTempo(), NyquistEffect::Process(), EffectReverse::Process(), Reinit(), WaveTrack::Interval::SetCentShift(), WaveTrack::Interval::SetTrimLeft(), WaveTrack::Interval::SetTrimRight(), WaveTrack::Interval::StretchBy(), WaveTrack::Interval::StretchLeftTo(), WaveTrack::Interval::StretchRightTo(), WaveTrack::Interval::TrimLeftTo(), and WaveTrack::Interval::TrimRightTo().
|
static |
Definition at line 802 of file WaveTrack.cpp.
References TrackList::Get(), WaveTrackFactory::Get(), project, and tracks.
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 3821 of file WaveTrack.cpp.
References CreateClip(), BasicUI::Get(), MakeNewClipName(), and mClips.
Referenced by GetIdealBlockSize(), HandleXMLChild(), and HandleXMLEndTag().
|
overridevirtual |
used only during deserialization
Implements ChannelGroup.
Definition at line 1025 of file WaveTrack.cpp.
References mClips.
Referenced by WaveformView::DoDraw(), and DoGetInterval().
|
virtual |
Weak precondition allows overrides to replicate one channel into many.
IsLeader()
SameKindAs(src)
src.NChannels() == 1 || src.NChannels() == NChannels()
Implements Track.
void Track::Paste | ( | double | t, |
const TrackList & | src | ||
) |
Non-virtual overload that passes the first track of a given list
IsLeader()
SameKindAs(**src.begin()).NChannels()
NChannels == (**src.begin()).NChannels()
Definition at line 380 of file Track.cpp.
|
overridevirtual |
Implements Track.
Definition at line 2436 of file WaveTrack.cpp.
References IsLeader(), and PasteWaveTrack().
Referenced by EffectStereoToMono::ProcessOne().
|
overridevirtual |
Find or create the destination track for a paste, maybe in a different project
IsLeader()
list | to which any newly created tracks are added; but left unchanged if an existing track is found in the project instead |
Implements Track.
Definition at line 1004 of file WaveTrack.cpp.
References TrackList::Add(), TrackList::Channels(), EmptyCopy(), WaveTrackFactory::Get(), IsLeader(), and project.
|
staticprivate |
Definition at line 2174 of file WaveTrack.cpp.
References BadUserAction, GetClipAtTime(), GetClipByIndex(), GetEditClipsCanMove(), GetLeftmostClip(), GetNumClips(), Track::GetOwner(), WaveClip::GetPlayEndTime(), WaveClip::GetPlayStartTime(), GetRate(), GetRightmostClip(), InsertClip(), IsEmpty(), WideSampleSequence::LongSamplesToTime(), MakeClipCopyName(), MakeNewClipName(), mClips, mpFactory, WaveClip::Paste(), WideSampleSequence::SnapToSample(), SplitAt(), and XO().
Referenced by ClearAndPasteOne(), PasteWaveTrackAtSameTempo(), and SyncLockAdjust().
|
private |
Definition at line 2143 of file WaveTrack.cpp.
References staffpad::vo::copy(), DuplicateWithOtherTempo(), Track::GetProjectTempo(), PasteWaveTrackAtSameTempo(), and THROW_INCONSISTENCY_EXCEPTION.
Referenced by ClearAndPasteAtSameTempo(), and Paste().
|
private |
Definition at line 2155 of file WaveTrack.cpp.
References TrackList::Channels(), GetEndTime(), Track::GetProjectTempo(), GetStartTime(), IsLeader(), NChannels(), and PasteOne().
Referenced by PasteWaveTrack().
|
static |
Definition at line 731 of file WaveTrack.cpp.
References ProjectRate::Get(), TrackList::Get(), GetRate(), project, and tracks.
Referenced by SelectFrequenciesCommand::Apply().
|
private |
Whether all clips of a leader track have a common rate.
IsLeader()
Definition at line 2349 of file WaveTrack.cpp.
References TrackList::Channels(), and IsLeader().
Referenced by LinkConsistencyFix().
|
overrideprivatevirtual |
This is temporary! It defaults to call the above.
Reimplemented from Channel.
Definition at line 1077 of file WaveTrack.cpp.
References ClientData::Site< Host, ClientData, ObjectCopyingPolicy, Pointer, ObjectLockingPolicy, RegistryLockingPolicy >::Find(), and Track::GetHolder().
void WaveTrack::Reinit | ( | const WaveTrack & | orig | ) |
Overwrite data excluding the sample sequence but including display settings
IsLeader()
orig.IsLeader()
NChannels() == orig.NChannels()
Definition at line 865 of file WaveTrack.cpp.
References TrackList::Channels(), IsLeader(), and NChannels().
Referenced by ProjectAudioManager::DoRecord().
Definition at line 1922 of file WaveTrack.cpp.
References anonymous_namespace{WaveTrack.cpp}::FindClip(), and mClips.
Referenced by ReverseOne().
bool WaveTrack::RemoveCutLine | ( | double | cutLinePosition | ) |
Remove cut line, without expanding the audio in it.
Definition at line 4090 of file WaveTrack.cpp.
References TrackList::Channels(), and IsLeader().
|
private |
IsLeader()
Definition at line 4170 of file WaveTrack.cpp.
References TrackList::Channels(), and IsLeader().
Referenced by ReplaceInterval().
|
private |
IsLeader()
oldOne->NChannels() == newOne->NChannels()
Definition at line 4183 of file WaveTrack.cpp.
References InsertInterval(), IsLeader(), and RemoveInterval().
Referenced by ApplyPitchAndSpeedOnIntervals().
void WaveTrack::Resample | ( | int | rate, |
BasicUI::ProgressDialog * | progress = NULL |
||
) |
Definition at line 4195 of file WaveTrack.cpp.
References TrackList::Channels(), and DoSetRate().
bool WaveTrack::Reverse | ( | sampleCount | start, |
sampleCount | len, | ||
const ProgressReport & | report = {} |
||
) |
Definition at line 4204 of file WaveTrack.cpp.
References TrackList::Channels(), and ReverseOne().
Referenced by EffectReverse::Process().
|
staticprivate |
Definition at line 4220 of file WaveTrack.cpp.
References AddClip(), PackedArray::end(), GetClips(), WaveClip::GetPlayEndSample(), WaveClip::GetPlayStartSample(), WideSampleSequence::LongSamplesToTime(), min(), RemoveAndReturnClip(), ReverseOneClip(), WideSampleSequence::SnapToSample(), SortedClipArray(), and SplitAt().
Referenced by Reverse().
|
staticprivate |
Definition at line 4348 of file WaveTrack.cpp.
References floatSample, GetBestBlockSize(), GetFloats(), GetMaxBlockSize(), limitSampleBufferSize(), narrowestSampleFormat, and WaveChannel::Set().
Referenced by ReverseOne().
WaveClip * WaveTrack::RightmostOrNewClip | ( | ) |
Get access to the last (rightmost) clip, or create a clip, if there is not already one.
Definition at line 3831 of file WaveTrack.cpp.
References CreateClip(), PackedArray::end(), BasicUI::Get(), WaveClip::GetPlayStartTime(), MakeNewClipName(), and mClips.
Referenced by AUPImportFileHandle::AddSamples(), FlushOne(), and AUPImportFileHandle::HandleEnvelope().
|
private |
Definition at line 1149 of file WaveTrack.cpp.
References mClips.
void WaveTrack::SetFloatAtTime | ( | double | t, |
size_t | iChannel, | ||
float | value, | ||
sampleFormat | effectiveFormat | ||
) |
Sets sample nearest to t
to value
. Silently fails if GetClipAtTime(t) == nullptr
.
Definition at line 3357 of file WaveTrack.cpp.
References anonymous_namespace{StretchingSequenceIntegrationTest.cpp}::iChannel, and SetFloatsCenteredAroundTime().
void WaveTrack::SetFloatsCenteredAroundTime | ( | double | t, |
size_t | iChannel, | ||
const float * | buffer, | ||
size_t | numSideSamples, | ||
sampleFormat | effectiveFormat | ||
) |
Similar to GetFloatsCenteredAroundTime, but for writing. Sets as many samples as it can according to the same rules as GetFloatsCenteredAroundTime. Leaves the other samples untouched.
Definition at line 3320 of file WaveTrack.cpp.
References backward, forward, anonymous_namespace{StretchingSequenceIntegrationTest.cpp}::iChannel, and SetFloatsFromTime().
Referenced by SetFloatAtTime().
|
private |
Similar to GetFloatsFromTime, but for writing. Sets as many samples as it can according to the same rules as GetFloatsFromTime. Leaves the other samples untouched.
Definition at line 3332 of file WaveTrack.cpp.
References floatSample, forward, GetAdjacentClip(), GetClipAtTime(), anonymous_namespace{WaveTrack.cpp}::GetSampleAccessArgs(), anonymous_namespace{StretchingSequenceIntegrationTest.cpp}::iChannel, and anonymous_namespace{WaveTrack.cpp}::RoundToNearestClipSample().
Referenced by SetFloatsCenteredAroundTime().
void WaveTrack::SetFloatsWithinTimeRange | ( | double | t0, |
double | t1, | ||
size_t | iChannel, | ||
const std::function< float(double sampleTime)> & | producer, | ||
sampleFormat | effectiveFormat | ||
) |
Provides a means of setting clip values as a function of time. Included are closest sample to t0 up to closest sample to t1, exclusively. If the given interval is empty, i.e., t0 >= t1
, no action is taken.
producer | a function taking sample (absolute, not clip-relative) time and returning the desired value for the sample at that time. |
Definition at line 3363 of file WaveTrack.cpp.
References forward, GetClipAtTime(), GetNextClip(), anonymous_namespace{StretchingSequenceIntegrationTest.cpp}::iChannel, min(), fast_float::round(), SortedClipArray(), and values.
void WaveTrack::SetGain | ( | float | newGain | ) |
Definition at line 1165 of file WaveTrack.cpp.
References DoSetGain(), GetGain(), and Track::Notify().
Referenced by MixerTrackCluster::HandleSliderGain(), and anonymous_namespace{TrackMenus.cpp}::SetTrackGain().
void WaveTrack::SetLegacyFormat | ( | sampleFormat | format | ) |
Definition at line 2783 of file WaveTrack.cpp.
References anonymous_namespace{ExportPCM.cpp}::format, and mLegacyFormat.
Referenced by AUPImportFileHandle::HandleXMLEndTag(), and HandleXMLTag().
void WaveTrack::SetPan | ( | float | newPan | ) |
Definition at line 1183 of file WaveTrack.cpp.
References DoSetPan(), GetPan(), and Track::Notify().
Referenced by MixerTrackCluster::HandleSliderPan(), MixAndRender(), WaveTrackMenuTable::OnMergeStereo(), and anonymous_namespace{TrackMenus.cpp}::SetTrackPan().
void WaveTrack::SetRate | ( | double | newRate | ) |
!brief Sets the new rate for the track without resampling it pre newRate > 0
Definition at line 1133 of file WaveTrack.cpp.
References Channels(), and DoSetRate().
Referenced by LinkConsistencyFix(), and RateMenuTable::SetRate().
void WaveTrack::SetWaveColorIndex | ( | int | colorIndex | ) |
IsLeader()
Definition at line 1220 of file WaveTrack.cpp.
References TrackList::Channels(), BasicUI::Get(), and IsLeader().
Referenced by SetTrackVisualsCommand::ApplyInner().
|
overridevirtual |
IsLeader()
Implements Track.
Definition at line 2451 of file WaveTrack.cpp.
References ApplyPitchAndSpeed(), TrackList::Channels(), PackedArray::end(), IsLeader(), min(), THROW_INCONSISTENCY_EXCEPTION, and WideSampleSequence::TimeToLongSamples().
Referenced by anonymous_namespace{LabelMenus.cpp}::OnSilenceLabels(), anonymous_namespace{EditMenus.cpp}::OnSplitCut(), and anonymous_namespace{LabelMenus.cpp}::OnSplitDeleteLabels().
WaveClipPointers WaveTrack::SortedClipArray | ( | ) |
Definition at line 4412 of file WaveTrack.cpp.
References mClips.
Referenced by SetEnvelopeCommand::ApplyInner(), ClearAndPasteOne(), EffectSBSMS::Finalize(), anonymous_namespace{ClipMenus.cpp}::FindNextClip(), anonymous_namespace{ClipMenus.cpp}::FindNextClipBoundary(), anonymous_namespace{ClipMenus.cpp}::FindPrevClip(), anonymous_namespace{ClipMenus.cpp}::FindPrevClipBoundary(), FindWaveTrackLocations(), GetClipAtTime(), anonymous_namespace{Nyquist.cpp}::GetClipBoundaries(), GetNextClip(), GetNumClips(), LinkConsistencyFix(), ReverseOne(), GetInfoCommand::SendClips(), GetInfoCommand::SendEnvelopes(), and SetFloatsWithinTimeRange().
WaveClipConstPointers WaveTrack::SortedClipArray | ( | ) | const |
Definition at line 4417 of file WaveTrack.cpp.
References mClips.
void WaveTrack::Split | ( | double | t0, |
double | t1 | ||
) |
IsLeader()
Definition at line 3993 of file WaveTrack.cpp.
References TrackList::Channels(), and IsLeader().
Referenced by ApplyPitchAndSpeed(), and anonymous_namespace{LabelMenus.cpp}::OnSplitLabels().
|
private |
Definition at line 4004 of file WaveTrack.cpp.
References InsertClip(), mClips, mpFactory, and WideSampleSequence::SnapToSample().
Referenced by PasteOne(), and ReverseOne().
TrackListHolder WaveTrack::SplitCut | ( | double | t0, |
double | t1 | ||
) |
IsLeader()
result->NChannels() == NChannels()
Definition at line 1315 of file WaveTrack.cpp.
References Copy(), IsLeader(), 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 | ||
) |
IsLeader()
Definition at line 1878 of file WaveTrack.cpp.
References TrackList::Channels(), and IsLeader().
Referenced by Disjoin(), EffectSBSMS::Finalize(), anonymous_namespace{EditMenus.cpp}::OnSplitDelete(), anonymous_namespace{LabelMenus.cpp}::OnSplitDeleteLabels(), anonymous_namespace{EditMenus.cpp}::OnSplitNew(), SplitCut(), and Trim().
|
overridevirtual |
This can be used to adjust a sync-lock selected track when the selection is replaced by one of a different length.
IsLeader()
Reimplemented from Track.
Definition at line 2096 of file WaveTrack.cpp.
References TrackList::Channels(), Clear(), EditClipsCanMove, GetEndTime(), GetRate(), GetSampleFormat(), IsEmpty(), IsLeader(), mpFactory, PasteOne(), Setting< T >::Read(), and TrackList::Temporary().
void WaveTrack::Trim | ( | double | t0, |
double | t1 | ||
) |
IsLeader()
Definition at line 1330 of file WaveTrack.cpp.
References TrackList::Channels(), Clear(), GetEndTime(), GetStartTime(), IsLeader(), and SplitDelete().
Referenced by anonymous_namespace{EditMenus.cpp}::OnTrim().
TrackListHolder WaveTrack::WideEmptyCopy | ( | const SampleBlockFactoryPtr & | pFactory = {} , |
bool | keepLink = true |
||
) | const |
Make another channel group copying format, rate, color, etc. but containing no clips; with as many channels as in this
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. |
IsLeader()
Definition at line 1385 of file WaveTrack.cpp.
References TrackList::Channels(), IsLeader(), and TrackList::Temporary().
|
overridevirtual |
Implements WideSampleSequence.
Definition at line 3592 of file WaveTrack.cpp.
References TrackList::Channels(), Track::GetOwner(), and narrowestSampleFormat.
|
staticprivate |
Definition at line 2968 of file WaveTrack.cpp.
References XMLMethodRegistry< Host >::CallWriters(), XMLWriter::EndTag(), XMLMethodRegistry< Host >::Get(), GetGain(), Track::GetLinkType(), GetPan(), GetRate(), GetSampleFormat(), GetWaveColorIndex(), anonymous_namespace{StretchingSequenceIntegrationTest.cpp}::iChannel, AudioGraph::LeftChannel, mClips, AudioGraph::MonoChannel, AudioGraph::RightChannel, XMLWriter::StartTag(), XMLWriter::WriteAttr(), and wxT().
|
overridevirtual |
Implements Track.
Definition at line 2957 of file WaveTrack.cpp.
References TrackList::Channels(), and anonymous_namespace{StretchingSequenceIntegrationTest.cpp}::iChannel.
|
friend |
Definition at line 297 of file WaveTrack.h.
|
private |
Definition at line 1212 of file WaveTrack.h.
|
private |
Do not call mClips.push_back
directly. Use InsertClip
instead.
this->GetWidth()
Definition at line 1122 of file WaveTrack.h.
Referenced by WaveTrack::AllClipsIterator::AllClipsIterator(), CanInsertClip(), CanOffsetClips(), ClearAndPasteOne(), CopyOne(), CreateClip(), DoGetInterval(), ExpandOneCutLine(), FindClipByName(), GetBestBlockSize(), GetClipByIndex(), GetClipIndex(), GetClipInterfaces(), GetClipsIntersecting(), GetLeftmostClip(), GetMaxBlockSize(), GetNumClips(), GetOne(), GetRightmostClip(), GetVisibleSampleCount(), HandleClear(), HandleXMLChild(), InsertClip(), IsEmpty(), JoinOne(), LinkConsistencyFix(), MergeOneClipPair(), NewestOrNewClip(), NIntervals(), PasteOne(), RemoveAndReturnClip(), RightmostOrNewClip(), SetClipRates(), SortedClipArray(), SplitAt(), WaveTrack(), and WriteOneXML().
|
private |
Definition at line 1211 of file WaveTrack.h.
|
private |
used only during deserialization
Definition at line 1125 of file WaveTrack.h.
Referenced by HandleXMLChild(), LinkConsistencyFix(), and SetLegacyFormat().
|
private |
Definition at line 1213 of file WaveTrack.h.
Referenced by HandleXMLChild(), HandleXMLTag(), and WaveTrack().
|
mutableprivate |
used only during deserialization
Definition at line 1124 of file WaveTrack.h.
Referenced by HandleXMLChild(), HandleXMLTag(), and LinkConsistencyFix().
|
private |
Definition at line 1209 of file WaveTrack.h.
Referenced by ClearAndPasteOne(), WaveTrackFactory::Create(), CreateClip(), EmptyCopy(), GetMaxBlockSize(), HandleClear(), HandleXMLChild(), Init(), InsertSilence(), PasteOne(), SplitAt(), SyncLockAdjust(), and WaveTrack().
|
private |
Definition at line 1215 of file WaveTrack.h.