Audacity 3.2.0
|
This allows multiple clips to be a part of one WaveTrack. More...
#include <WaveClip.h>
Classes | |
class | ClearSequenceFinisher |
Fix consistency of cutlines and envelope after deleting from Sequences. More... | |
struct | CreateToken |
struct | StrongInvariantScope |
struct | Transaction |
Restores state when an update loop over mSequences fails midway. More... | |
Public Types | |
using | Attachments = Site< WaveClip, WaveClipListener, ClientData::DeepCopying > |
using | Channel = WaveClipChannel |
Public Types inherited from ClientData::Site< WaveClip, WaveClipListener, ClientData::DeepCopying > | |
using | DataType = WaveClipListener |
using | DataPointer = UniquePtr< WaveClipListener > |
using | DataFactory = std::function< DataPointer(WaveClip &) > |
Type of function from which RegisteredFactory is constructed; it builds attachments. More... | |
Public Types inherited from Observer::Publisher< CentShiftChange > | |
using | message_type = CentShiftChange |
using | CallbackReturn = std::conditional_t< true, void, bool > |
using | Callback = std::function< CallbackReturn(const CentShiftChange &) > |
Type of functions that can be connected to the Publisher. More... | |
Public Types inherited from Observer::Publisher< PitchAndSpeedPresetChange > | |
using | message_type = PitchAndSpeedPresetChange |
using | CallbackReturn = std::conditional_t< true, void, bool > |
using | Callback = std::function< CallbackReturn(const PitchAndSpeedPresetChange &) > |
Type of functions that can be connected to the Publisher. More... | |
Public Types inherited from Observer::Publisher< StretchRatioChange > | |
using | message_type = StretchRatioChange |
using | CallbackReturn = std::conditional_t< true, void, bool > |
using | Callback = std::function< CallbackReturn(const StretchRatioChange &) > |
Type of functions that can be connected to the Publisher. More... | |
Public Types inherited from Observer::Publisher< WaveClipDtorCalled > | |
using | message_type = WaveClipDtorCalled |
using | CallbackReturn = std::conditional_t< true, void, bool > |
using | Callback = std::function< CallbackReturn(const WaveClipDtorCalled &) > |
Type of functions that can be connected to the Publisher. More... | |
Public Member Functions | |
WaveClip (size_t width, const SampleBlockFactoryPtr &factory, sampleFormat format, int rate) | |
typical constructor More... | |
WaveClip (const WaveClip &orig, const SampleBlockFactoryPtr &factory, bool copyCutlines) | |
WaveClip (const WaveClip &orig, const SampleBlockFactoryPtr &factory, bool copyCutlines, double t0, double t1) | |
Copy only a range from the given WaveClip. More... | |
virtual | ~WaveClip () |
double | Start () const override |
double | End () const override |
std::shared_ptr< ChannelInterval > | DoGetChannel (size_t iChannel) override |
Retrieve a channel. More... | |
auto | Channels () |
auto | Channels () const |
bool | CheckInvariants () const |
Check weak invariant conditions on mSequences and mCutlines. More... | |
bool | StrongInvariant () const |
void | AssertOrRepairStrongInvariant () |
size_t | NChannels () const override |
How many Sequences the clip contains. More... | |
void | ConvertToSampleFormat (sampleFormat format, const std::function< void(size_t)> &progressReport={}) |
int | GetRate () const override |
void | SetRate (int rate) |
void | SetRawAudioTempo (double tempo) |
PitchAndSpeedPreset | GetPitchAndSpeedPreset () const |
void | StretchLeftTo (double to) |
Stretches from left to the absolute time (if in expected range) More... | |
void | StretchRightTo (double to) |
Sets from the right to the absolute time (if in expected range) More... | |
void | StretchBy (double ratio) |
double | GetStretchRatio () const override |
bool | SetCentShift (int cents) |
int | GetCentShift () const override |
Observer::Subscription | SubscribeToCentShiftChange (std::function< void(int)> cb) const override |
void | SetPitchAndSpeedPreset (PitchAndSpeedPreset preset) |
virtual Observer::Subscription | SubscribeToPitchAndSpeedPresetChange (std::function< void(PitchAndSpeedPreset)> cb) const override |
void | Resample (int rate, BasicUI::ProgressDialog *progress=nullptr) |
double | GetSequenceStartTime () const noexcept |
void | SetSequenceStartTime (double startTime) |
double | GetSequenceEndTime () const |
sampleCount | GetSequenceStartSample () const |
Returns the index of the first sample of the underlying sequence. More... | |
sampleCount | GetSequenceSamplesCount () const |
double | GetPlayStartTime () const noexcept override |
void | SetPlayStartTime (double time) |
double | GetPlayEndTime () const override |
double | GetPlayDuration () const |
bool | IsEmpty () const |
sampleCount | GetPlayStartSample () const |
Real start time of the clip, quantized to raw sample rate (track's rate) More... | |
sampleCount | GetPlayEndSample () const |
Real end time of the clip, quantized to raw sample rate (track's rate) More... | |
sampleCount | GetVisibleSampleCount () const override |
void | SetTrimLeft (double trim) |
Sets the play start offset in seconds from the beginning of the underlying sequence. More... | |
double | GetTrimLeft () const noexcept |
Returns the play start offset in seconds from the beginning of the underlying sequence. More... | |
void | SetTrimRight (double trim) |
Sets the play end offset in seconds from the ending of the underlying sequence. More... | |
double | GetTrimRight () const noexcept |
Returns the play end offset in seconds from the ending of the underlying sequence. More... | |
void | TrimLeft (double deltaTime) |
Moves play start position by deltaTime. More... | |
void | TrimRight (double deltaTime) |
Moves play end position by deltaTime. More... | |
void | TrimQuarternotesFromRight (double quarters) |
Same as TrimRight , but expressed as quarter notes. More... | |
void | TrimLeftTo (double to) |
Sets the the left trimming to the absolute time (if that is in bounds) More... | |
void | TrimRightTo (double to) |
Sets the the right trimming to the absolute time (if that is in bounds) More... | |
void | ShiftBy (double delta) noexcept |
bool | SplitsPlayRegion (double t) const |
[ < t and t < ), such that if the track were split at t , it would split this clip in two of lengths > 0. More... | |
bool | WithinPlayRegion (double t) const |
t ∈ [...) More... | |
bool | BeforePlayRegion (double t) const |
t < [ More... | |
bool | AtOrBeforePlayRegion (double t) const |
t <= [ More... | |
bool | AfterPlayRegion (double t) const |
) <= t More... | |
bool | EntirelyWithinPlayRegion (double t0, double t1) const |
t0 and t1 both ∈ [...) More... | |
bool | PartlyWithinPlayRegion (double t0, double t1) const |
t0 xor t1 ∈ [...) More... | |
bool | IntersectsPlayRegion (double t0, double t1) const |
[t0, t1) ∩ [...) != ∅ More... | |
bool | CoversEntirePlayRegion (double t0, double t1) const |
t0 <= [ and ) <= t1, such that removing [t0, t1) from the track deletes this clip. More... | |
sampleCount | CountSamples (double t0, double t1) const |
AudioSegmentSampleView | GetSampleView (size_t iChannel, sampleCount start, size_t length, bool mayThrow=true) const override |
Request up to length samples. The actual number of samples available from the returned view is queried through AudioSegmentSampleView::GetSampleCount() . More... | |
AudioSegmentSampleView | GetSampleView (size_t iChannel, double t0, double t1, bool mayThrow=true) const |
Request interval samples within [t0, t1). t0 and t1 are truncated to the clip's play start and end. Stretching 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. The actual number of samples available from the returned view is queried through AudioSegmentSampleView::GetSampleCount() . More... | |
bool | GetSamples (size_t ii, samplePtr buffer, sampleFormat format, sampleCount start, size_t len, bool mayThrow=true) const |
Get samples from one channel. More... | |
bool | GetSamples (samplePtr buffers[], sampleFormat format, sampleCount start, size_t len, bool mayThrow=true) const |
Get (non-interleaved) samples from all channels. More... | |
void | SetSamples (size_t ii, constSamplePtr buffer, sampleFormat format, sampleCount start, size_t len, sampleFormat effectiveFormat) |
Envelope & | GetEnvelope () noexcept |
const Envelope & | GetEnvelope () const noexcept |
void | SetEnvelope (std::unique_ptr< Envelope > p) |
const BlockArray * | GetSequenceBlockArray (size_t ii) const |
Sequence * | GetSequence (size_t ii) |
const Sequence * | GetSequence (size_t ii) const |
std::pair< float, float > | GetMinMax (size_t ii, double t0, double t1, bool mayThrow) const |
float | GetRMS (size_t ii, double t0, double t1, bool mayThrow) const |
void | UpdateEnvelopeTrackLen () |
std::shared_ptr< SampleBlock > | AppendToChannel (size_t iChannel, constSamplePtr buffer, sampleFormat format, size_t len) |
std::shared_ptr< SampleBlock > | AppendLegacyNewBlock (constSamplePtr buffer, sampleFormat format, size_t len) |
void | AppendLegacySharedBlock (const std::shared_ptr< SampleBlock > &pBlock) |
bool | Append (size_t iChannel, size_t nChannels, constSamplePtr buffers[], sampleFormat format, size_t len, unsigned int stride, sampleFormat effectiveFormat) |
bool | Append (constSamplePtr buffers[], sampleFormat format, size_t len, unsigned int stride, sampleFormat effectiveFormat) |
void | Flush () |
Flush must be called after last Append. More... | |
void | RepairChannels () |
Ensure that all sequences have the same sample count. More... | |
void | Clear (double t0, double t1) |
void | ClearLeft (double t) |
void | ClearRight (double t) |
void | ClearAndAddCutLine (double t0, double t1) |
void | AddCutLine (WaveClipHolder pClip) |
bool | Paste (double t0, const WaveClip &other) |
void | InsertSilence (double t, double len, double *pEnvelopeValue=nullptr) |
void | AppendSilence (double len, double envelopeValue) |
const WaveClipHolders & | GetCutLines () |
Get access to cut lines list. More... | |
const WaveClipConstHolders & | GetCutLines () const |
size_t | NumCutLines () const |
bool | FindCutLine (double cutLinePosition, double *cutLineStart=nullptr, double *cutLineEnd=nullptr) const |
void | ExpandCutLine (double cutLinePosition) |
bool | RemoveCutLine (double cutLinePosition) |
Remove cut line, without expanding the audio in it. More... | |
void | OffsetCutLines (double t0, double len) |
Offset cutlines right to time 't0' by time amount 'len'. More... | |
void | CloseLock () noexcept |
Should be called upon project close. Not balanced by unlocking calls. More... | |
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 (size_t ii, XMLWriter &xmlFile) const |
bool | GetIsPlaceholder () const |
void | SetIsPlaceholder (bool val) |
void | SetName (const wxString &name) |
const wxString & | GetName () const |
sampleCount | TimeToSamples (double time) const override |
double | SamplesToTime (sampleCount s) const noexcept |
void | SetSilence (sampleCount offset, sampleCount length) |
Silences the 'length' amount of samples starting from 'offset'(relative to the play start) More... | |
constSamplePtr | GetAppendBuffer (size_t ii) const |
Get one channel of the append buffer. More... | |
size_t | GetAppendBufferLen (size_t ii) const |
void | OnProjectTempoChange (const std::optional< double > &oldTempo, double newTempo) |
SampleFormats | GetSampleFormats () const |
size_t | CountBlocks () const |
void | DiscardRightChannel () |
Reduce width. More... | |
void | SwapChannels () |
std::shared_ptr< WaveClip > | SplitChannels () |
void | MakeStereo (WaveClip &&other, bool mustAlign) |
size_t | GetBestBlockSize (sampleCount t) const |
A hint for sizing of well aligned fetches. More... | |
size_t | GetMaxBlockSize () const |
WaveClip (const WaveClip &orig, const SampleBlockFactoryPtr &factory, bool copyCutlines, CreateToken token) | |
bool | HasEqualPitchAndSpeed (const WaveClip &other) const |
bool | HasPitchOrSpeed () const |
Public Member Functions inherited from ClipInterface | |
~ClipInterface () override | |
virtual AudioSegmentSampleView | GetSampleView (size_t iChannel, sampleCount start, size_t length, bool mayThrow=true) const =0 |
virtual size_t | NChannels () const =0 |
virtual int | GetCentShift () const =0 |
virtual Observer::Subscription | SubscribeToCentShiftChange (std::function< void(int)> cb) const =0 |
virtual PitchAndSpeedPreset | GetPitchAndSpeedPreset () const =0 |
virtual Observer::Subscription | SubscribeToPitchAndSpeedPresetChange (std::function< void(PitchAndSpeedPreset)> cb) const =0 |
Public Member Functions inherited from ClipTimes | |
virtual | ~ClipTimes () |
virtual sampleCount | GetVisibleSampleCount () const =0 |
virtual int | GetRate () const =0 |
virtual double | GetPlayStartTime () const =0 |
virtual double | GetPlayEndTime () const =0 |
virtual sampleCount | TimeToSamples (double time) const =0 |
virtual double | GetStretchRatio () const =0 |
Public Member Functions inherited from WideChannelGroupInterval | |
~WideChannelGroupInterval () override | |
virtual size_t | NChannels () const =0 |
Report the number of channels. More... | |
template<typename IntervalType = ChannelInterval> | |
std::shared_ptr< IntervalType > | GetChannel (size_t iChannel) |
Retrieve a channel, cast to the given type. More... | |
template<typename IntervalType = const ChannelInterval> | |
auto | GetChannel (size_t iChannel) const -> std::enable_if_t< std::is_const_v< IntervalType >, std::shared_ptr< IntervalType > > |
template<typename IntervalType = ChannelInterval> | |
IteratorRange< ChannelIterator< IntervalType > > | Channels () |
Get range of ChannelInterval objects with mutative access. More... | |
template<typename IntervalType = const ChannelInterval> | |
auto | Channels () const -> std::enable_if_t< std::is_const_v< IntervalType >, IteratorRange< ChannelIterator< IntervalType > > > |
Get range of channels with read-only access. More... | |
Public Member Functions inherited from ChannelGroupInterval | |
ChannelGroupInterval ()=default | |
virtual | ~ChannelGroupInterval () |
virtual double | Start () const =0 |
virtual double | End () const =0 |
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< WaveClip, WaveClipListener, ClientData::DeepCopying > | |
~Site () | |
Site () | |
Site (const Site &other) | |
Site (Site &&other) | |
Site & | operator= (const Site &other) |
Site & | operator= (Site &&other) |
size_t | size () const |
How many attachment pointers are in the Site. More... | |
Subclass & | Get (const RegisteredFactory &key) |
Get reference to an attachment, creating on demand if not present, down-cast it to Subclass. More... | |
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... | |
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... | |
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... | |
void | Assign (const RegisteredFactory &key, ReplacementPointer &&replacement) |
Reassign Site's pointer to ClientData. More... | |
Public Member Functions inherited from Observer::Publisher< CentShiftChange > | |
Publisher (ExceptionPolicy *pPolicy=nullptr, Alloc a={}) | |
Constructor supporting type-erased custom allocation/deletion. More... | |
Publisher (Publisher &&)=default | |
Publisher & | operator= (Publisher &&)=default |
Subscription | Subscribe (Callback callback) |
Connect a callback to the Publisher; later-connected are called earlier. More... | |
Subscription | Subscribe (Object &obj, Return(Object::*callback)(Args...)) |
Overload of Subscribe takes an object and pointer-to-member-function. More... | |
Public Member Functions inherited from Observer::Publisher< PitchAndSpeedPresetChange > | |
Publisher (ExceptionPolicy *pPolicy=nullptr, Alloc a={}) | |
Constructor supporting type-erased custom allocation/deletion. More... | |
Publisher (Publisher &&)=default | |
Publisher & | operator= (Publisher &&)=default |
Subscription | Subscribe (Callback callback) |
Connect a callback to the Publisher; later-connected are called earlier. More... | |
Subscription | Subscribe (Object &obj, Return(Object::*callback)(Args...)) |
Overload of Subscribe takes an object and pointer-to-member-function. More... | |
Public Member Functions inherited from Observer::Publisher< StretchRatioChange > | |
Publisher (ExceptionPolicy *pPolicy=nullptr, Alloc a={}) | |
Constructor supporting type-erased custom allocation/deletion. More... | |
Publisher (Publisher &&)=default | |
Publisher & | operator= (Publisher &&)=default |
Subscription | Subscribe (Callback callback) |
Connect a callback to the Publisher; later-connected are called earlier. More... | |
Subscription | Subscribe (Object &obj, Return(Object::*callback)(Args...)) |
Overload of Subscribe takes an object and pointer-to-member-function. More... | |
Public Member Functions inherited from Observer::Publisher< WaveClipDtorCalled > | |
Publisher (ExceptionPolicy *pPolicy=nullptr, Alloc a={}) | |
Constructor supporting type-erased custom allocation/deletion. More... | |
Publisher (Publisher &&)=default | |
Publisher & | operator= (Publisher &&)=default |
Subscription | Subscribe (Callback callback) |
Connect a callback to the Publisher; later-connected are called earlier. More... | |
Subscription | Subscribe (Object &obj, Return(Object::*callback)(Args...)) |
Overload of Subscribe takes an object and pointer-to-member-function. More... | |
Static Public Attributes | |
static const char * | WaveClip_tag = "waveclip" |
Static Public Attributes inherited from Observer::Publisher< CentShiftChange > | |
static constexpr bool | notifies_all |
Static Public Attributes inherited from Observer::Publisher< PitchAndSpeedPresetChange > | |
static constexpr bool | notifies_all |
Static Public Attributes inherited from Observer::Publisher< StretchRatioChange > | |
static constexpr bool | notifies_all |
Static Public Attributes inherited from Observer::Publisher< WaveClipDtorCalled > | |
static constexpr bool | notifies_all |
Private Member Functions | |
WaveClip (const WaveClip &)=delete | |
WaveClip & | operator= (const WaveClip &)=delete |
size_t | GreatestAppendBufferLen () const |
void | MarkChanged () noexcept |
Called by mutating operations; notifies listeners. More... | |
sampleCount | TimeToSequenceSamples (double t) const |
bool | StretchRatioEquals (double value) const |
sampleCount | GetNumSamples () const |
const SampleBlockFactoryPtr & | GetFactory () const |
std::vector< std::unique_ptr< Sequence > > | GetEmptySequenceCopies () const |
void | StretchCutLines (double ratioChange) |
double | SnapToTrackSample (double time) const noexcept |
ClearSequenceFinisher | ClearSequence (double t0, double t1) |
Static Private Member Functions | |
static void | TransferSequence (WaveClip &origClip, WaveClip &newClip) |
static void | FixSplitCutlines (WaveClipHolders &myCutlines, WaveClipHolders &newCutlines) |
Private Attributes | |
PitchAndSpeedPreset | mPitchAndSpeedPreset { PitchAndSpeedPreset::Default } |
int | mCentShift { 0 } |
double | mClipStretchRatio = 1. |
std::optional< double > | mRawAudioTempo |
std::optional< double > | mProjectTempo |
int | mRate |
Sample rate of the raw audio, i.e., before stretching. More... | |
std::vector< std::unique_ptr< Sequence > > | mSequences |
std::unique_ptr< Envelope > | mEnvelope |
Envelope is unique, not per-sequence, and always non-null. More... | |
WaveClipHolders | mCutLines {} |
bool | mIsPlaceholder { false } |
wxString | mName |
double | mSequenceOffset { 0 } |
double | mTrimLeft { 0 } |
double | mTrimRight { 0 } |
Additional Inherited Members | |
Static Public Member Functions inherited from ClientData::Site< WaveClip, WaveClipListener, ClientData::DeepCopying > | |
static size_t | numFactories () |
How many static factories have been registered with this specialization of Site. More... | |
virtual std::shared_ptr< ChannelInterval > | DoGetChannel (size_t iChannel)=0 |
Retrieve a channel. More... | |
Protected Member Functions inherited from ClientData::Site< WaveClip, WaveClipListener, ClientData::DeepCopying > | |
void | ForEach (const Function &function) |
Invoke function on each ClientData object that has been created in this . More... | |
void | ForEach (const Function &function) const |
Invoke function on each ClientData object that has been created in this . More... | |
void | ForCorresponding (Site &other, const Function &function, bool create=true) |
WaveClipListener * | FindIf (const Function &function) |
Return pointer to first attachment in this that is not null and satisfies a predicate, or nullptr. More... | |
const WaveClipListener * | FindIf (const Function &function) const |
Return pointer to first attachment in this that is not null and satisfies a predicate, or nullptr. More... | |
void | EraseIf (const Function &function) |
Erase attached objects satisfying a predicate. More... | |
void | BuildAll () |
For each RegisteredFactory, if the corresponding attachment is absent in this , build and store it. More... | |
Protected Member Functions inherited from Observer::Publisher< CentShiftChange > | |
CallbackReturn | Publish (const CentShiftChange &message) |
Send a message to connected callbacks. More... | |
Protected Member Functions inherited from Observer::Publisher< PitchAndSpeedPresetChange > | |
CallbackReturn | Publish (const PitchAndSpeedPresetChange &message) |
Send a message to connected callbacks. More... | |
Protected Member Functions inherited from Observer::Publisher< StretchRatioChange > | |
CallbackReturn | Publish (const StretchRatioChange &message) |
Send a message to connected callbacks. More... | |
Protected Member Functions inherited from Observer::Publisher< WaveClipDtorCalled > | |
CallbackReturn | Publish (const WaveClipDtorCalled &message) |
Send a message to connected callbacks. More... | |
This allows multiple clips to be a part of one WaveTrack.
Definition at line 228 of file WaveClip.h.
Definition at line 251 of file WaveClip.h.
using WaveClip::Channel = WaveClipChannel |
Definition at line 293 of file WaveClip.h.
|
privatedelete |
WaveClip::WaveClip | ( | size_t | width, |
const SampleBlockFactoryPtr & | factory, | ||
sampleFormat | format, | ||
int | rate | ||
) |
typical constructor
width | how many sequences |
width > 0
NChannels() == width
Definition at line 223 of file WaveClip.cpp.
References CheckInvariants(), factory, anonymous_namespace{ExportPCM.cpp}::format, mEnvelope, mRate, mSequences, and narrowestSampleFormat.
|
inline |
essentially a copy constructor - but you must pass in the current sample block factory, because we might be copying from one project to another
NChannels() == orig.NChannels()
!copyCutlines || NumCutLines() == orig.NumCutLines()
Definition at line 270 of file WaveClip.h.
WaveClip::WaveClip | ( | const WaveClip & | orig, |
const SampleBlockFactoryPtr & | factory, | ||
bool | copyCutlines, | ||
double | t0, | ||
double | t1 | ||
) |
Copy only a range from the given WaveClip.
NChannels() == orig.NChannels()
Definition at line 281 of file WaveClip.cpp.
References CheckInvariants(), CountSamples(), factory, GetIsPlaceholder(), GetPlayEndTime(), GetPlayStartTime(), GetSequenceEndTime(), GetSequenceStartTime(), mCutLines, mEnvelope, mIsPlaceholder, mRate, mSequenceOffset, mSequences, mTrimLeft, mTrimRight, NChannels(), SamplesToTime(), and TimeToSamples().
|
virtual |
Definition at line 335 of file WaveClip.cpp.
References Observer::Publisher< Message, NotifyAll >::Publish().
WaveClip::WaveClip | ( | const WaveClip & | orig, |
const SampleBlockFactoryPtr & | factory, | ||
bool | copyCutlines, | ||
CreateToken | token | ||
) |
essentially a copy constructor - but you must pass in the current sample block factory, because we might be copying from one project to another
This is effectively private because CreateToken is private, but must be public to cooperate with make_shared.
The clip so constructed does NOT (yet) satisfy the class invariants!
emptyCopy | if true, don't make sequences |
NChannels() == (token.emptyCopy ? 0 : orig.NChannels())
!copyCutlines || NumCutLines() == orig.NumCutLines()
Definition at line 238 of file WaveClip.cpp.
References CheckInvariants(), WaveClip::CreateToken::emptyCopy, factory, GetIsPlaceholder(), mCutLines, mEnvelope, mIsPlaceholder, mName, mRate, mSequenceOffset, mSequences, mTrimLeft, mTrimRight, NChannels(), and NumCutLines().
void WaveClip::AddCutLine | ( | WaveClipHolder | pClip | ) |
NChannels() == pClip->NChannels()
Definition at line 1470 of file WaveClip.cpp.
References CheckInvariants(), mCutLines, and NChannels().
Referenced by ClearAndAddCutLine().
bool WaveClip::AfterPlayRegion | ( | double | t | ) | const |
) <= t
Definition at line 1952 of file WaveClip.cpp.
References GetPlayEndTime().
bool WaveClip::Append | ( | constSamplePtr | buffers[], |
sampleFormat | format, | ||
size_t | len, | ||
unsigned int | stride, | ||
sampleFormat | effectiveFormat | ||
) |
Append (non-interleaved) samples to all channels You must call Flush after the last Append
StrongInvariant()
StrongInvariant()
effectiveFormat | Make the effective format of the data at least the minumum of this value and `format`. (Maybe wider, if merging with preexistent data.) If the data are later narrowed from stored format, but not narrower than the effective, then no dithering will occur. |
Definition at line 869 of file WaveClip.cpp.
References WaveClip::Transaction::Commit(), anonymous_namespace{ExportPCM.cpp}::format, MarkChanged(), mSequences, anonymous_namespace{wxCommandTargets.cpp}::scope, and UpdateEnvelopeTrackLen().
bool WaveClip::Append | ( | size_t | iChannel, |
size_t | nChannels, | ||
constSamplePtr | buffers[], | ||
sampleFormat | format, | ||
size_t | len, | ||
unsigned int | stride, | ||
sampleFormat | effectiveFormat | ||
) |
Append (non-interleaved) samples to some or all channels You must call Flush after the last Append
For stereo clips, typically this is invoked on left, then right channels, either alternating (as when recording) or in two batches (channel-major pattern of effect processing), which violates the strong invariant condition, then restores it (either repeatedly, or once).
iChannel < NChannels()
iChannel + nChannels <= NChannels()
effectiveFormat | Make the effective format of the data at least the minumum of this value and `format`. (Maybe wider, if merging with preexistent data.) If the data are later narrowed from stored format, but not narrower than the effective, then no dithering will occur. |
Definition at line 844 of file WaveClip.cpp.
References Append(), anonymous_namespace{ExportPCM.cpp}::format, anonymous_namespace{StretchingSequenceIntegrationTest.cpp}::iChannel, MarkChanged(), mSequences, NChannels(), and UpdateEnvelopeTrackLen().
Referenced by Append().
std::shared_ptr< SampleBlock > WaveClip::AppendLegacyNewBlock | ( | constSamplePtr | buffer, |
sampleFormat | format, | ||
size_t | len | ||
) |
For use in importing pre-version-3 projects to preserve sharing of blocks; no dithering applied
NChannels() == 1
Definition at line 826 of file WaveClip.cpp.
References AppendToChannel(), anonymous_namespace{ExportPCM.cpp}::format, and NChannels().
void WaveClip::AppendLegacySharedBlock | ( | const std::shared_ptr< SampleBlock > & | pBlock | ) |
For use in importing pre-version-3 projects to preserve sharing of blocks
NChannels() == 1
Definition at line 835 of file WaveClip.cpp.
References mSequences, and NChannels().
void WaveClip::AppendSilence | ( | double | len, |
double | envelopeValue | ||
) |
Insert silence at the end, and causes the envelope to ramp linearly to the given value
Definition at line 1276 of file WaveClip.cpp.
References GetPlayEndTime(), and InsertSilence().
std::shared_ptr< SampleBlock > WaveClip::AppendToChannel | ( | size_t | iChannel, |
constSamplePtr | buffer, | ||
sampleFormat | format, | ||
size_t | len | ||
) |
iChannel < NChannels()
Definition at line 817 of file WaveClip.cpp.
References anonymous_namespace{ExportPCM.cpp}::format, anonymous_namespace{StretchingSequenceIntegrationTest.cpp}::iChannel, mSequences, and NChannels().
Referenced by AppendLegacyNewBlock().
void WaveClip::AssertOrRepairStrongInvariant | ( | ) |
When StrongInvariant()
is false, violate an assertion in debug, but in release, establish it (or fail, propagating an exception)
Definition at line 2030 of file WaveClip.cpp.
References RepairChannels(), and StrongInvariant().
Referenced by WaveClip::StrongInvariantScope::StrongInvariantScope().
bool WaveClip::AtOrBeforePlayRegion | ( | double | t | ) | const |
t <= [
Definition at line 1947 of file WaveClip.cpp.
References GetPlayStartTime().
bool WaveClip::BeforePlayRegion | ( | double | t | ) | const |
t < [
Definition at line 1942 of file WaveClip.cpp.
References GetPlayStartTime().
Referenced by EntirelyWithinPlayRegion().
|
inline |
Definition at line 295 of file WaveClip.h.
|
inline |
Definition at line 298 of file WaveClip.h.
bool WaveClip::CheckInvariants | ( | ) | const |
Check weak invariant conditions on mSequences and mCutlines.
Conditions are mSequences.size() > 0
all sequences are non-null all sequences have the same sample formats and sample block factory all cutlines satisfy the strong invariant
Definition at line 1979 of file WaveClip.cpp.
References details::end(), mCutLines, mSequences, and NChannels().
Referenced by AddCutLine(), DiscardRightChannel(), HandleXMLEndTag(), MakeStereo(), StrongInvariant(), SwapChannels(), TransferSequence(), and WaveClip().
void WaveClip::Clear | ( | double | t0, |
double | t1 | ||
) |
This name is consistent with WaveTrack::Clear. It performs a "Cut" operation (but without putting the cut audio to the clipboard)
Definition at line 1283 of file WaveClip.cpp.
References ClearSequence(), WaveClip::ClearSequenceFinisher::Commit(), GetPlayEndTime(), GetPlayStartTime(), GetSequenceEndTime(), GetSequenceStartTime(), GetTrimLeft(), MarkChanged(), SetTrimLeft(), SetTrimRight(), and ShiftBy().
void WaveClip::ClearAndAddCutLine | ( | double | t0, |
double | t1 | ||
) |
Clear, and add cut line that starts at t0 and contains everything until t1 if there is at least one clip sample between t0 and t1, noop otherwise.
StrongInvariant()
StrongInvariant()
Definition at line 1406 of file WaveClip.cpp.
References AddCutLine(), Envelope::CollapseRegion(), CountSamples(), GetEnvelope(), GetFactory(), GetPlayEndTime(), GetPlayStartTime(), GetRate(), GetSequenceStartTime(), MarkChanged(), mCutLines, min(), mSequences, anonymous_namespace{wxCommandTargets.cpp}::scope, ShiftBy(), and TimeToSequenceSamples().
void WaveClip::ClearLeft | ( | double | t | ) |
Removes samples starting from the left boundary of the clip till t, if it's inside the play region. Also removes trimmed (hidden) data, if present. Changes offset to make remaining samples stay at their old place. Destructive operation.
Definition at line 1310 of file WaveClip.cpp.
References ClearSequence(), WaveClip::ClearSequenceFinisher::Commit(), GetPlayEndTime(), GetPlayStartTime(), GetSequenceStartTime(), MarkChanged(), SetSequenceStartTime(), and SetTrimLeft().
void WaveClip::ClearRight | ( | double | t | ) |
Removes samples starting from t (if it's inside the clip), till the right boundary. Also removes trimmed (hidden) data, if present. Destructive operation.
Definition at line 1324 of file WaveClip.cpp.
References ClearSequence(), WaveClip::ClearSequenceFinisher::Commit(), GetPlayEndTime(), GetPlayStartTime(), GetSequenceEndTime(), MarkChanged(), and SetTrimRight().
|
private |
This name is consistent with WaveTrack::Clear. It performs a "Cut" operation (but without putting the cut audio to the clipboard)
StrongInvariant()
StrongInvariant()
Definition at line 1337 of file WaveClip.cpp.
References min(), and anonymous_namespace{wxCommandTargets.cpp}::scope.
Referenced by Clear(), ClearLeft(), ClearRight(), InsertSilence(), and Paste().
|
noexcept |
Should be called upon project close. Not balanced by unlocking calls.
Definition at line 1559 of file WaveClip.cpp.
References mCutLines, and mSequences.
void WaveClip::ConvertToSampleFormat | ( | sampleFormat | format, |
const std::function< void(size_t)> & | progressReport = {} |
||
) |
Definition at line 782 of file WaveClip.cpp.
References anonymous_namespace{ExportPCM.cpp}::format, MarkChanged(), mSequences, and NChannels().
size_t WaveClip::CountBlocks | ( | ) | const |
Definition at line 693 of file WaveClip.cpp.
References mSequences.
sampleCount WaveClip::CountSamples | ( | double | t0, |
double | t1 | ||
) | const |
Counts number of sample times within t0 and t1 region. t0 and t1 are rounded to the nearest clip sample boundary, i.e. relative to clips start time offset.
Definition at line 1957 of file WaveClip.cpp.
References GetPlayEndTime(), GetPlayStartTime(), min(), and TimeToSamples().
Referenced by ClearAndAddCutLine(), and WaveClip().
bool WaveClip::CoversEntirePlayRegion | ( | double | t0, |
double | t1 | ||
) | const |
t0 <= [ and ) <= t1, such that removing [t0, t1) from the track deletes this clip.
Definition at line 1936 of file WaveClip.cpp.
References GetPlayEndTime(), and GetPlayStartTime().
void WaveClip::DiscardRightChannel | ( | ) |
Reduce width.
NChannels() == 1
Definition at line 429 of file WaveClip.cpp.
References CheckInvariants(), WaveClipListener::Erase(), mCutLines, mSequences, and NChannels().
Referenced by SplitChannels().
|
overridevirtual |
Retrieve a channel.
!(iChannel < NChannels()) || result
Implements WideChannelGroupInterval.
Definition at line 350 of file WaveClip.cpp.
References anonymous_namespace{StretchingSequenceIntegrationTest.cpp}::iChannel.
|
overridevirtual |
Start() < result
Implements ChannelGroupInterval.
Definition at line 345 of file WaveClip.cpp.
References GetPlayEndTime().
Referenced by anonymous_namespace{WaveClipAdjustBorderHandle.cpp}::GetRightAdjustLimit(), and TimeStretching::SetClipStretchRatio().
bool WaveClip::EntirelyWithinPlayRegion | ( | double | t0, |
double | t1 | ||
) | const |
t0 and t1 both ∈ [...)
Definition at line 1914 of file WaveClip.cpp.
References BeforePlayRegion(), and GetPlayEndTime().
void WaveClip::ExpandCutLine | ( | double | cutLinePosition | ) |
Expand cut line (that is, re-insert audio, then DELETE audio saved in cut line). Returns true if a cut line could be found and successfully expanded, false otherwise
Definition at line 1499 of file WaveClip.cpp.
References details::end(), GetSequenceStartTime(), mCutLines, and Paste().
bool WaveClip::FindCutLine | ( | double | cutLinePosition, |
double * | cutLineStart = nullptr , |
||
double * | cutLineEnd = nullptr |
||
) | const |
Find cut line at (approximately) this position. Returns true and fills in cutLineStart and cutLineEnd (if specified) if a cut line at this position could be found. Return false otherwise.
Definition at line 1478 of file WaveClip.cpp.
References GetSequenceStartTime(), and mCutLines.
|
staticprivate |
Definition at line 462 of file WaveClip.cpp.
References FixSplitCutlines(), and TransferSequence().
Referenced by FixSplitCutlines(), and SplitChannels().
void WaveClip::Flush | ( | ) |
Flush must be called after last Append.
In case of exceptions, the clip contents are unchanged but un-flushed data are lost
Definition at line 893 of file WaveClip.cpp.
References WaveClip::Transaction::Commit(), GreatestAppendBufferLen(), MarkChanged(), mSequences, and UpdateEnvelopeTrackLen().
Referenced by Resample().
constSamplePtr WaveClip::GetAppendBuffer | ( | size_t | ii | ) | const |
Get one channel of the append buffer.
ii | identifies the channel |
ii < NChannels()
Definition at line 729 of file WaveClip.cpp.
References mSequences, and NChannels().
Referenced by WaveClipChannel::GetAppendBuffer(), and anonymous_namespace{WaveDataCache.cpp}::AppendBufferHelper::GetAppendBufferPointer().
size_t WaveClip::GetAppendBufferLen | ( | size_t | ii | ) | const |
ii | identifies the channel |
ii < NChannels()
Definition at line 423 of file WaveClip.cpp.
References anonymous_namespace{StretchingSequenceIntegrationTest.cpp}::iChannel, mSequences, and NChannels().
Referenced by WaveClipChannel::GetAppendBufferLen(), anonymous_namespace{WaveDataCache.cpp}::AppendBufferHelper::GetAppendBufferPointer(), GreatestAppendBufferLen(), and anonymous_namespace{WaveDataCache.cpp}::MakeDefaultDataProvider().
size_t WaveClip::GetBestBlockSize | ( | sampleCount | t | ) | const |
A hint for sizing of well aligned fetches.
Definition at line 701 of file WaveClip.cpp.
References mSequences.
|
overridevirtual |
Implements ClipInterface.
Definition at line 634 of file WaveClip.cpp.
References mCentShift.
Referenced by anonymous_namespace{PitchAndSpeedDialog.cpp}::GetClipShift(), HasEqualPitchAndSpeed(), and HasPitchOrSpeed().
|
inline |
|
inline |
Definition at line 729 of file WaveClip.h.
|
private |
Definition at line 719 of file WaveClip.cpp.
References mSequences.
Referenced by Resample().
|
inlinenoexcept |
Definition at line 554 of file WaveClip.h.
|
inlinenoexcept |
Definition at line 553 of file WaveClip.h.
Referenced by ClearAndAddCutLine(), WaveClipChannel::GetEnvelope(), AUPImportFileHandle::HandleEnvelope(), InsertSilence(), and WaveClip::ClearSequenceFinisher::~ClearSequenceFinisher().
|
private |
Definition at line 713 of file WaveClip.cpp.
References mSequences.
Referenced by ClearAndAddCutLine(), MakeStereo(), Paste(), SplitChannels(), and WaveClip::Transaction::Transaction().
|
inline |
Definition at line 772 of file WaveClip.h.
Referenced by WaveClip().
size_t WaveClip::GetMaxBlockSize | ( | ) | const |
Definition at line 706 of file WaveClip.cpp.
References mSequences.
std::pair< float, float > WaveClip::GetMinMax | ( | size_t | ii, |
double | t0, | ||
double | t1, | ||
bool | mayThrow | ||
) | const |
Getting high-level data for one channel for screen display and clipping calculations and Contrast
ii | identifies the channel |
ii < NChannels()
Definition at line 740 of file WaveClip.cpp.
References GetPlayEndTime(), GetPlayStartTime(), min(), mSequences, NChannels(), THROW_INCONSISTENCY_EXCEPTION, and TimeToSequenceSamples().
Referenced by WaveClipChannel::GetMinMax().
const wxString & WaveClip::GetName | ( | ) | const |
|
private |
Definition at line 678 of file WaveClip.cpp.
References mSequences.
Referenced by GetPlayEndTime(), GetSampleView(), GetSequenceEndTime(), GetSequenceSamplesCount(), GetVisibleSampleCount(), MakeStereo(), RepairChannels(), Resample(), SetRate(), TimeToSequenceSamples(), and UpdateEnvelopeTrackLen().
|
virtual |
Implements ClipInterface.
Definition at line 1606 of file WaveClip.cpp.
References mPitchAndSpeedPreset.
double WaveClip::GetPlayDuration | ( | ) | const |
Always a multiple of the track's sample period, whether the clip is stretched or not.
Definition at line 1784 of file WaveClip.cpp.
References GetPlayEndTime(), and GetPlayStartTime().
Referenced by IsEmpty().
sampleCount WaveClip::GetPlayEndSample | ( | ) | const |
Real end time of the clip, quantized to raw sample rate (track's rate)
Definition at line 1799 of file WaveClip.cpp.
References GetPlayEndTime(), and mRate.
Referenced by WaveClipChannel::GetPlayEndSample().
|
overridevirtual |
Open-end of play region. Always a multiple of the track's sample period, whether the clip is stretched or not.
Implements ClipTimes.
Definition at line 1772 of file WaveClip.cpp.
References GetNumSamples(), GetStretchRatio(), GreatestAppendBufferLen(), mRate, mSequenceOffset, mTrimRight, and SnapToTrackSample().
Referenced by AUPImportFileHandle::AddSilence(), AfterPlayRegion(), AppendSilence(), Clear(), ClearAndAddCutLine(), ClearLeft(), ClearRight(), CountSamples(), CoversEntirePlayRegion(), WaveClipChannel::End(), End(), EntirelyWithinPlayRegion(), GetMinMax(), GetPlayDuration(), GetPlayEndSample(), WaveClipChannel::GetPlayEndTime(), InsertSilence(), IntersectsPlayRegion(), Paste(), WaveClipUIUtilities::SelectClip(), anonymous_namespace{ClipOverflowButtonHandle.cpp}::SelectInterval(), SplitsPlayRegion(), StretchLeftTo(), StretchRightTo(), TrimLeftTo(), WaveClip(), and WithinPlayRegion().
sampleCount WaveClip::GetPlayStartSample | ( | ) | const |
Real start time of the clip, quantized to raw sample rate (track's rate)
Definition at line 1794 of file WaveClip.cpp.
References GetPlayStartTime(), and mRate.
Referenced by WaveClipChannel::GetPlayStartSample().
|
overridevirtualnoexcept |
Closed-begin of play region. Always a multiple of the track's sample period, whether the clip is stretched or not.
Implements ClipTimes.
Definition at line 1762 of file WaveClip.cpp.
References mSequenceOffset, mTrimLeft, and SnapToTrackSample().
Referenced by AtOrBeforePlayRegion(), BeforePlayRegion(), Clear(), ClearAndAddCutLine(), ClearLeft(), ClearRight(), CountSamples(), CoversEntirePlayRegion(), GetMinMax(), GetPlayDuration(), GetPlayStartSample(), WaveClipChannel::GetPlayStartTime(), InsertSilence(), IntersectsPlayRegion(), Paste(), WaveClipUIUtilities::SelectClip(), anonymous_namespace{ClipOverflowButtonHandle.cpp}::SelectInterval(), WaveClipUtilities::SharesBoundaryWithNextClip(), SplitsPlayRegion(), WaveClipChannel::Start(), Start(), StretchBy(), StretchLeftTo(), StretchRightTo(), TrimRightTo(), WaveClip(), and WithinPlayRegion().
|
inlineoverridevirtual |
Implements ClipTimes.
Definition at line 337 of file WaveClip.h.
Referenced by ClearAndAddCutLine(), WaveClipChannel::GetRate(), InsertSilence(), Paste(), WaveClipUtilities::SharesBoundaryWithNextClip(), TrimQuarternotesFromRight(), UpdateEnvelopeTrackLen(), WaveBitmapCache::WaveBitmapCache(), and WaveClip::ClearSequenceFinisher::~ClearSequenceFinisher().
float WaveClip::GetRMS | ( | size_t | ii, |
double | t0, | ||
double | t1, | ||
bool | mayThrow | ||
) | const |
Getting high-level data for one channel for screen display and clipping calculations and Contrast
ii | identifies the channel |
ii < NChannels()
Definition at line 764 of file WaveClip.cpp.
References mSequences, NChannels(), THROW_INCONSISTENCY_EXCEPTION, and TimeToSequenceSamples().
Referenced by WaveClipChannel::GetRMS().
SampleFormats WaveClip::GetSampleFormats | ( | ) | const |
Definition at line 687 of file WaveClip.cpp.
References mSequences.
Referenced by anonymous_namespace{WaveDataCache.cpp}::AppendBufferHelper::GetAppendBufferPointer(), MakeStereo(), and Paste().
bool WaveClip::GetSamples | ( | samplePtr | buffers[], |
sampleFormat | format, | ||
sampleCount | start, | ||
size_t | len, | ||
bool | mayThrow = true |
||
) | const |
Get (non-interleaved) samples from all channels.
assume as many buffers available as NChannels()
start | relative to clip play start sample |
Definition at line 387 of file WaveClip.cpp.
References anonymous_namespace{ExportPCM.cpp}::format, GetSamples(), and NChannels().
bool WaveClip::GetSamples | ( | size_t | ii, |
samplePtr | buffer, | ||
sampleFormat | format, | ||
sampleCount | start, | ||
size_t | len, | ||
bool | mayThrow = true |
||
) | const |
Get samples from one channel.
ii | identifies the channel |
start | relative to clip play start sample |
ii < NChannels()
Definition at line 378 of file WaveClip.cpp.
References anonymous_namespace{ExportPCM.cpp}::format, mSequences, mTrimLeft, NChannels(), and TimeToSamples().
Referenced by WaveClipUtilities::GetFloatAtTime(), WaveClipChannel::GetSamples(), and GetSamples().
AudioSegmentSampleView WaveClip::GetSampleView | ( | size_t | iChannel, |
double | t0, | ||
double | t1, | ||
bool | mayThrow = true |
||
) | const |
Request interval samples within [t0, t1). t0
and t1
are truncated to the clip's play start and end. Stretching 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. The actual number of samples available from the returned view is queried through AudioSegmentSampleView::GetSampleCount()
.
iChannel < NChannels()
size_t
Definition at line 363 of file WaveClip.cpp.
References GetNumSamples(), GetSampleView(), anonymous_namespace{StretchingSequenceIntegrationTest.cpp}::iChannel, min(), NChannels(), and TimeToSamples().
|
overridevirtual |
Request up to length
samples. The actual number of samples available from the returned view is queried through AudioSegmentSampleView::GetSampleCount()
.
start | index of first clip sample from play start |
iChannel < NChannels()
Implements ClipInterface.
Definition at line 355 of file WaveClip.cpp.
References mSequences, mTrimLeft, NChannels(), and TimeToSamples().
Referenced by WaveClipChannel::GetSampleView(), and GetSampleView().
|
inline |
Get low-level access to a sequence. Whenever possible, don't use this, but use more high-level functions inside WaveClip (or add them if you think they are useful for general use)
ii < NChannels()
Definition at line 571 of file WaveClip.h.
Referenced by WaveClipChannel::GetSequence(), and anonymous_namespace{WaveDataCache.cpp}::MakeDefaultDataProvider().
|
inline |
Get low-level access to a sequence. Whenever possible, don't use this, but use more high-level functions inside WaveClip (or add them if you think they are useful for general use)
ii < NChannels()
Definition at line 578 of file WaveClip.h.
const BlockArray * WaveClip::GetSequenceBlockArray | ( | size_t | ii | ) | const |
ii | identifies the channel |
ii < NChannels()
Definition at line 417 of file WaveClip.cpp.
References mSequences, and NChannels().
Referenced by WaveClipChannel::GetSequenceBlockArray().
double WaveClip::GetSequenceEndTime | ( | ) | const |
Definition at line 1885 of file WaveClip.cpp.
References GetNumSamples(), GetSequenceStartTime(), GetStretchRatio(), and mRate.
Referenced by Clear(), ClearRight(), anonymous_namespace{WaveClipAdjustBorderHandle.cpp}::GetLeftAdjustLimit(), anonymous_namespace{WaveClipAdjustBorderHandle.cpp}::GetRightAdjustLimit(), InsertSilence(), Paste(), TimeToSequenceSamples(), TrimRightTo(), and WaveClip().
sampleCount WaveClip::GetSequenceSamplesCount | ( | ) | const |
Returns the total number of samples in all underlying sequences (but not counting the cutlines)
Definition at line 1757 of file WaveClip.cpp.
References GetNumSamples(), and NChannels().
Referenced by Paste().
sampleCount WaveClip::GetSequenceStartSample | ( | ) | const |
Returns the index of the first sample of the underlying sequence.
Definition at line 1893 of file WaveClip.cpp.
References mSequenceOffset, and TimeToSamples().
|
noexcept |
Definition at line 1872 of file WaveClip.cpp.
References mSequenceOffset.
Referenced by Clear(), ClearAndAddCutLine(), ClearLeft(), ExpandCutLine(), FindCutLine(), anonymous_namespace{WaveClipAdjustBorderHandle.cpp}::GetLeftAdjustLimit(), anonymous_namespace{WaveClipAdjustBorderHandle.cpp}::GetRightAdjustLimit(), GetSequenceEndTime(), InsertSilence(), OffsetCutLines(), Paste(), RemoveCutLine(), SetRate(), ShiftBy(), TimeToSequenceSamples(), WaveClip(), and WaveClip::ClearSequenceFinisher::~ClearSequenceFinisher().
|
overridevirtual |
Implements ClipTimes.
Definition at line 625 of file WaveClip.cpp.
References mClipStretchRatio, mProjectTempo, and mRawAudioTempo.
Referenced by GetPlayEndTime(), GetSequenceEndTime(), WaveClipChannel::GetStretchRatio(), HasEqualPitchAndSpeed(), OnProjectTempoChange(), Paste(), SamplesToTime(), TimeStretching::SetClipStretchRatio(), SetRate(), WaveClipUtilities::SharesBoundaryWithNextClip(), StretchBy(), StretchLeftTo(), StretchRatioEquals(), TimeToSamples(), TrimQuarternotesFromRight(), UpdateEnvelopeTrackLen(), and WaveBitmapCache::WaveBitmapCache().
|
noexcept |
Returns the play start offset in seconds from the beginning of the underlying sequence.
Definition at line 1815 of file WaveClip.cpp.
References mTrimLeft.
Referenced by Clear(), and WaveClipChannel::GetTrimLeft().
|
noexcept |
Returns the play end offset in seconds from the ending of the underlying sequence.
Definition at line 1825 of file WaveClip.cpp.
References mTrimRight.
Referenced by WaveClipChannel::GetTrimRight().
|
overridevirtual |
Returns a number of raw samples, not accounting for stretching.
Implements ClipTimes.
Definition at line 1804 of file WaveClip.cpp.
References GetNumSamples(), mTrimLeft, mTrimRight, and TimeToSamples().
Referenced by WaveClipChannel::GetVisibleSampleCount(), WaveClipUtilities::SetFloatsFromTime(), and WaveClipUtilities::SharesBoundaryWithNextClip().
|
private |
Definition at line 537 of file WaveClip.cpp.
References GetAppendBufferLen(), anonymous_namespace{StretchingSequenceIntegrationTest.cpp}::iChannel, mSequences, and NChannels().
Referenced by Flush(), and GetPlayEndTime().
|
overridevirtual |
Implements XMLTagHandler.
Definition at line 1034 of file WaveClip.cpp.
References anonymous_namespace{ExportPCM.cpp}::format, mCutLines, mEnvelope, mRate, mSequences, Sequence::Sequence_tag, and WaveClip_tag.
Referenced by AUPImportFileHandle::HandleSequence(), and AUPImportFileHandle::HandleWaveClip().
|
override |
Definition at line 1020 of file WaveClip.cpp.
References CheckInvariants(), mSequences, UpdateEnvelopeTrackLen(), and WaveClip_tag.
|
overridevirtual |
Implements XMLTagHandler.
Definition at line 947 of file WaveClip.cpp.
References CentShiftAttr, ClipStretchRatio_attr, WaveClipListener::HandleXMLAttribute(), mCentShift, mClipStretchRatio, mPitchAndSpeedPreset, mRawAudioTempo, Name_attr, Offset_attr, PitchAndSpeedPreset_attr, RawAudioTempo_attr, SetName(), SetSequenceStartTime(), SetTrimLeft(), SetTrimRight(), TrimLeft_attr, TrimRight_attr, and WaveClip_tag.
bool WaveClip::HasEqualPitchAndSpeed | ( | const WaveClip & | other | ) | const |
Checks for stretch-ratio equality, accounting for rounding errors.
Definition at line 661 of file WaveClip.cpp.
References GetCentShift(), GetStretchRatio(), and StretchRatioEquals().
bool WaveClip::HasPitchOrSpeed | ( | ) | const |
Definition at line 667 of file WaveClip.cpp.
References GetCentShift(), and StretchRatioEquals().
Referenced by WaveClipChannel::HasPitchOrSpeed().
void WaveClip::InsertSilence | ( | double | t, |
double | len, | ||
double * | pEnvelopeValue = nullptr |
||
) |
Insert silence - note that this is an efficient operation for large amounts of silence
StrongInvariant()
StrongInvariant()
Definition at line 1229 of file WaveClip.cpp.
References ClearSequence(), WaveClip::ClearSequenceFinisher::Commit(), GetEnvelope(), GetPlayEndTime(), GetPlayStartTime(), GetRate(), GetSequenceEndTime(), GetSequenceStartTime(), MarkChanged(), mSequences, OffsetCutLines(), anonymous_namespace{wxCommandTargets.cpp}::scope, SetTrimRight(), TimeToSamples(), and TimeToSequenceSamples().
Referenced by AUPImportFileHandle::AddSilence(), and AppendSilence().
bool WaveClip::IntersectsPlayRegion | ( | double | t0, |
double | t1 | ||
) | const |
[t0, t1) ∩ [...) != ∅
Definition at line 1928 of file WaveClip.cpp.
References GetPlayEndTime(), and GetPlayStartTime().
Referenced by WaveClipChannel::Intersects().
bool WaveClip::IsEmpty | ( | ) | const |
Definition at line 1789 of file WaveClip.cpp.
References GetPlayDuration(), and mRate.
void WaveClip::MakeStereo | ( | WaveClip && | other, |
bool | mustAlign | ||
) |
Steal the right side data from other All cutlines are lost in this
! Cutlines are not copied from other.
Stating sufficient preconditions for the postondition. Even stronger preconditions on matching offset, trims, and rates could be stated.
NChannels() == 1
other.NChannels() == 1
GetSampleFormats() == other.GetSampleFormats()
GetSampleBlockFactory() == other.GetSampleBlockFactory()
!mustAlign || GetNumSamples() == other.GetNumSamples()
!mustAlign || StrongInvariant()
Definition at line 512 of file WaveClip.cpp.
References CheckInvariants(), GetFactory(), GetNumSamples(), GetSampleFormats(), WaveClipListener::MakeStereo(), mCutLines, mSequences, NChannels(), and StrongInvariant().
|
privatenoexcept |
Called by mutating operations; notifies listeners.
Definition at line 735 of file WaveClip.cpp.
References WaveClipListener::MarkChanged().
Referenced by Append(), Clear(), ClearAndAddCutLine(), ClearLeft(), ClearRight(), ConvertToSampleFormat(), Flush(), InsertSilence(), Paste(), Resample(), SetRate(), SetSamples(), SetSilence(), and ShiftBy().
|
overridevirtual |
How many Sequences the clip contains.
Implements WideChannelGroupInterval.
Definition at line 373 of file WaveClip.cpp.
References mSequences.
Referenced by AddCutLine(), Append(), AppendLegacyNewBlock(), AppendLegacySharedBlock(), AppendToChannel(), CheckInvariants(), ConvertToSampleFormat(), DiscardRightChannel(), anonymous_namespace{WaveformView.cpp}::WaveformPainter::EnsureClip(), GetAppendBuffer(), GetAppendBufferLen(), GetMinMax(), GetRMS(), GetSamples(), GetSampleView(), GetSequenceBlockArray(), GetSequenceSamplesCount(), GreatestAppendBufferLen(), MakeStereo(), Paste(), RepairChannels(), SetSamples(), SplitChannels(), StrongInvariant(), SwapChannels(), and WaveClip().
|
inline |
Definition at line 731 of file WaveClip.h.
Referenced by WaveClip().
void WaveClip::OffsetCutLines | ( | double | t0, |
double | len | ||
) |
Offset cutlines right to time 't0' by time amount 'len'.
Definition at line 1550 of file WaveClip.cpp.
References GetSequenceStartTime(), and mCutLines.
Referenced by InsertSilence(), and Paste().
void WaveClip::OnProjectTempoChange | ( | const std::optional< double > & | oldTempo, |
double | newTempo | ||
) |
Definition at line 545 of file WaveClip.cpp.
References GetStretchRatio(), mEnvelope, mProjectTempo, mRawAudioTempo, mSequenceOffset, mTrimLeft, mTrimRight, Observer::Publisher< Message, NotifyAll >::Publish(), and StretchCutLines().
bool WaveClip::PartlyWithinPlayRegion | ( | double | t0, |
double | t1 | ||
) | const |
t0 xor t1 ∈ [...)
Definition at line 1922 of file WaveClip.cpp.
References WithinPlayRegion().
bool WaveClip::Paste | ( | double | t0, |
const WaveClip & | o | ||
) |
this->NChannels() == other.NChannels()
and either this is empty or this->GetStretchRatio() == other.GetStretchRatio()
.StrongInvariant()
other.StrongInvariant()
StrongInvariant()
This says, same widths and ratios are sufficient for success
this->NChannels() != other.NChannels() || this->GetStretchRatio() != other.GetStretchRatio() || result
Definition at line 1100 of file WaveClip.cpp.
References sampleCount::as_double(), ClearSequence(), WaveClip::ClearSequenceFinisher::Commit(), staffpad::vo::copy(), factory, GetFactory(), GetPlayEndTime(), GetPlayStartTime(), GetRate(), GetSampleFormats(), GetSequenceEndTime(), GetSequenceSamplesCount(), GetSequenceStartTime(), GetStretchRatio(), MarkChanged(), mClipStretchRatio, mCutLines, mEnvelope, mProjectTempo, mRate, mRawAudioTempo, mSequences, NChannels(), OffsetCutLines(), Paste(), anonymous_namespace{wxCommandTargets.cpp}::scope, SetTrimLeft(), SetTrimRight(), SampleFormats::Stored(), StrongInvariant(), and TimeToSequenceSamples().
Referenced by ExpandCutLine(), and Paste().
bool WaveClip::RemoveCutLine | ( | double | cutLinePosition | ) |
Remove cut line, without expanding the audio in it.
Definition at line 1533 of file WaveClip.cpp.
References GetSequenceStartTime(), and mCutLines.
void WaveClip::RepairChannels | ( | ) |
Ensure that all sequences have the same sample count.
Definition at line 918 of file WaveClip.cpp.
References GetNumSamples(), mSequences, and NChannels().
Referenced by AssertOrRepairStrongInvariant().
void WaveClip::Resample | ( | int | rate, |
BasicUI::ProgressDialog * | progress = nullptr |
||
) |
We want to keep going as long as we have something to feed the resampler with OR as long as the resampler spews out samples (which could continue for a few iterations after we stop feeding it)
Definition at line 1612 of file WaveClip.cpp.
References sampleCount::as_long_long(), floatSample, Flush(), GetEmptySequenceCopies(), GetNumSamples(), Internal, WaveClipListener::Invalidate(), limitSampleBufferSize(), MarkChanged(), mRate, mSequences, BasicUI::ProgressDialog::Poll(), BasicUI::Success, widestSampleFormat, and XO().
|
noexcept |
Definition at line 1736 of file WaveClip.cpp.
References GetStretchRatio(), and mRate.
Referenced by SetRate(), and WaveClip().
bool WaveClip::SetCentShift | ( | int | cents | ) |
Definition at line 1588 of file WaveClip.cpp.
References TimeAndPitchInterface::MaxCents, mCentShift, TimeAndPitchInterface::MinCents, and Observer::Publisher< Message, NotifyAll >::Publish().
void WaveClip::SetEnvelope | ( | std::unique_ptr< Envelope > | p | ) |
|
inline |
Definition at line 773 of file WaveClip.h.
void WaveClip::SetName | ( | const wxString & | name | ) |
Definition at line 1721 of file WaveClip.cpp.
Referenced by HandleXMLTag().
void WaveClip::SetPitchAndSpeedPreset | ( | PitchAndSpeedPreset | preset | ) |
Definition at line 1599 of file WaveClip.cpp.
References mPitchAndSpeedPreset, preset, and Observer::Publisher< Message, NotifyAll >::Publish().
void WaveClip::SetPlayStartTime | ( | double | time | ) |
Definition at line 1767 of file WaveClip.cpp.
References mTrimLeft, and SetSequenceStartTime().
void WaveClip::SetRate | ( | int | rate | ) |
Definition at line 1568 of file WaveClip.cpp.
References sampleCount::as_double(), GetNumSamples(), GetSequenceStartTime(), GetStretchRatio(), MarkChanged(), mEnvelope, mRate, mTrimLeft, mTrimRight, SamplesToTime(), SetSequenceStartTime(), and TimeToSamples().
void WaveClip::SetRawAudioTempo | ( | double | tempo | ) |
Definition at line 1583 of file WaveClip.cpp.
References mRawAudioTempo.
void WaveClip::SetSamples | ( | size_t | ii, |
constSamplePtr | buffer, | ||
sampleFormat | format, | ||
sampleCount | start, | ||
size_t | len, | ||
sampleFormat | effectiveFormat | ||
) |
ii | identifies the channel |
ii < NChannels()
StrongInvariant()
StrongInvariant()
start | relative to clip play start sample |
effectiveFormat | Make the effective format of the data at least the minumum of this value and `format`. (Maybe wider, if merging with preexistent data.) If the data are later narrowed from stored format, but not narrower than the effective, then no dithering will occur. |
Definition at line 397 of file WaveClip.cpp.
References anonymous_namespace{ExportPCM.cpp}::format, MarkChanged(), mSequences, mTrimLeft, NChannels(), anonymous_namespace{wxCommandTargets.cpp}::scope, and TimeToSamples().
Referenced by WaveClipUtilities::SetFloatsFromTime(), and WaveClipChannel::SetSamples().
void WaveClip::SetSequenceStartTime | ( | double | startTime | ) |
Definition at line 1879 of file WaveClip.cpp.
References mEnvelope, and mSequenceOffset.
Referenced by ClearLeft(), HandleXMLTag(), SetPlayStartTime(), SetRate(), and ShiftBy().
void WaveClip::SetSilence | ( | sampleCount | offset, |
sampleCount | length | ||
) |
Silences the 'length' amount of samples starting from 'offset'(relative to the play start)
StrongInvariant()
StrongInvariant()
Definition at line 1746 of file WaveClip.cpp.
References WaveClip::Transaction::Commit(), MarkChanged(), mSequences, mTrimLeft, anonymous_namespace{wxCommandTargets.cpp}::scope, and TimeToSamples().
void WaveClip::SetTrimLeft | ( | double | trim | ) |
Sets the play start offset in seconds from the beginning of the underlying sequence.
Definition at line 1810 of file WaveClip.cpp.
References mTrimLeft.
Referenced by Clear(), ClearLeft(), HandleXMLTag(), Paste(), and TrimLeft().
void WaveClip::SetTrimRight | ( | double | trim | ) |
Sets the play end offset in seconds from the ending of the underlying sequence.
Definition at line 1820 of file WaveClip.cpp.
References mTrimRight.
Referenced by Clear(), ClearRight(), HandleXMLTag(), InsertSilence(), Paste(), and TrimRight().
|
noexcept |
Definition at line 1898 of file WaveClip.cpp.
References GetSequenceStartTime(), MarkChanged(), and SetSequenceStartTime().
Referenced by Clear(), ClearAndAddCutLine(), WaveTrackShifter::DoHorizontalOffset(), and WaveClip::ClearSequenceFinisher::~ClearSequenceFinisher().
|
privatenoexcept |
Definition at line 1741 of file WaveClip.cpp.
References mRate, and fast_float::round().
Referenced by GetPlayEndTime(), GetPlayStartTime(), TrimLeftTo(), and TrimRightTo().
std::shared_ptr< WaveClip > WaveClip::SplitChannels | ( | ) |
A stereo WaveClip becomes mono, keeping the left side and returning a new clip with the right side samples
NChannels() == 2
NChannels() == 1
result->NChannels() == 1
Definition at line 480 of file WaveClip.cpp.
References DiscardRightChannel(), WaveClipListener::Erase(), FixSplitCutlines(), GetFactory(), mCutLines, NChannels(), and TransferSequence().
bool WaveClip::SplitsPlayRegion | ( | double | t | ) | const |
[ < t and t < ), such that if the track were split at t
, it would split this clip in two of lengths > 0.
The play region is an open-closed interval, [...), where "[ = GetPlayStartTime()", and ") = GetPlayEndTime()."
Definition at line 1904 of file WaveClip.cpp.
References GetPlayEndTime(), and GetPlayStartTime().
|
overridevirtual |
result < End()
Implements ChannelGroupInterval.
Definition at line 340 of file WaveClip.cpp.
References GetPlayStartTime().
Referenced by anonymous_namespace{WaveClipAdjustBorderHandle.cpp}::GetLeftAdjustLimit(), and TimeStretching::SetClipStretchRatio().
void WaveClip::StretchBy | ( | double | ratio | ) |
Definition at line 599 of file WaveClip.cpp.
References GetPlayStartTime(), GetStretchRatio(), mClipStretchRatio, mEnvelope, mSequenceOffset, mTrimLeft, mTrimRight, Observer::Publisher< Message, NotifyAll >::Publish(), and StretchCutLines().
Referenced by StretchRightTo().
|
private |
Definition at line 613 of file WaveClip.cpp.
References mCutLines.
Referenced by OnProjectTempoChange(), StretchBy(), and StretchLeftTo().
void WaveClip::StretchLeftTo | ( | double | to | ) |
Stretches from left to the absolute time (if in expected range)
Definition at line 569 of file WaveClip.cpp.
References GetPlayEndTime(), GetPlayStartTime(), GetStretchRatio(), mClipStretchRatio, mEnvelope, mSequenceOffset, mTrimLeft, mTrimRight, Observer::Publisher< Message, NotifyAll >::Publish(), and StretchCutLines().
Referenced by anonymous_namespace{WaveClipAdjustBorderHandle.cpp}::StretchLeftTo().
|
private |
Definition at line 672 of file WaveClip.cpp.
References GetStretchRatio(), and TimeAndPitchInterface::IsPassThroughMode().
Referenced by HasEqualPitchAndSpeed(), and HasPitchOrSpeed().
void WaveClip::StretchRightTo | ( | double | to | ) |
Sets from the right to the absolute time (if in expected range)
Definition at line 588 of file WaveClip.cpp.
References GetPlayEndTime(), GetPlayStartTime(), and StretchBy().
Referenced by WaveTrackUtilities::ExpandClipTillNextOne(), TimeStretching::SetClipStretchRatio(), and anonymous_namespace{WaveClipAdjustBorderHandle.cpp}::StretchRightTo().
bool WaveClip::StrongInvariant | ( | ) | const |
A precondition for some mutating operations CheckInvariants() is true, and also all sequences have the same length
Definition at line 2013 of file WaveClip.cpp.
References CheckInvariants(), details::end(), mSequences, and NChannels().
Referenced by AssertOrRepairStrongInvariant(), MakeStereo(), and Paste().
|
overridevirtual |
Implements ClipInterface.
Definition at line 640 of file WaveClip.cpp.
References CentShiftChange::newValue.
|
overridevirtual |
Implements ClipInterface.
Definition at line 649 of file WaveClip.cpp.
References PitchAndSpeedPresetChange::newValue.
void WaveClip::SwapChannels | ( | ) |
NChannels() == 2
Definition at line 441 of file WaveClip.cpp.
References CheckInvariants(), mCutLines, mSequences, NChannels(), anonymous_namespace{NoteTrack.cpp}::swap(), and WaveClipListener::SwapChannels().
|
overridevirtual |
Implements ClipTimes.
Definition at line 1731 of file WaveClip.cpp.
References GetStretchRatio(), and mRate.
Referenced by CountSamples(), WaveClipUtilities::GetFloatAtTime(), GetSamples(), GetSampleView(), GetSequenceStartSample(), GetVisibleSampleCount(), InsertSilence(), WaveClipUtilities::SetFloatsFromTime(), SetRate(), SetSamples(), SetSilence(), WaveClipChannel::TimeToSamples(), TimeToSequenceSamples(), and WaveClip().
|
private |
Definition at line 1970 of file WaveClip.cpp.
References GetNumSamples(), GetSequenceEndTime(), GetSequenceStartTime(), and TimeToSamples().
Referenced by ClearAndAddCutLine(), GetMinMax(), GetRMS(), InsertSilence(), and Paste().
Definition at line 453 of file WaveClip.cpp.
References CheckInvariants(), and mSequences.
Referenced by FixSplitCutlines(), and SplitChannels().
void WaveClip::TrimLeft | ( | double | deltaTime | ) |
Moves play start position by deltaTime.
Definition at line 1830 of file WaveClip.cpp.
References mTrimLeft, and SetTrimLeft().
void WaveClip::TrimLeftTo | ( | double | to | ) |
Sets the the left trimming to the absolute time (if that is in bounds)
Definition at line 1859 of file WaveClip.cpp.
References GetPlayEndTime(), mSequenceOffset, mTrimLeft, and SnapToTrackSample().
Referenced by anonymous_namespace{WaveClipAdjustBorderHandle.cpp}::TrimLeftTo().
void WaveClip::TrimQuarternotesFromRight | ( | double | quarters | ) |
Same as TrimRight
, but expressed as quarter notes.
Definition at line 1840 of file WaveClip.cpp.
References GetRate(), GetStretchRatio(), mRawAudioTempo, and TrimRight().
void WaveClip::TrimRight | ( | double | deltaTime | ) |
Moves play end position by deltaTime.
Definition at line 1835 of file WaveClip.cpp.
References mTrimRight, and SetTrimRight().
Referenced by TrimQuarternotesFromRight().
void WaveClip::TrimRightTo | ( | double | to | ) |
Sets the the right trimming to the absolute time (if that is in bounds)
Definition at line 1866 of file WaveClip.cpp.
References GetPlayStartTime(), GetSequenceEndTime(), mTrimRight, and SnapToTrackSample().
Referenced by anonymous_namespace{WaveClipAdjustBorderHandle.cpp}::TrimRightTo().
void WaveClip::UpdateEnvelopeTrackLen | ( | ) |
Whenever you do an operation to the sequence that will change the number of samples (that is, the length of the clip), you will want to call this function to tell the envelope about it.
Definition at line 807 of file WaveClip.cpp.
References sampleCount::as_double(), GetNumSamples(), GetRate(), GetStretchRatio(), mEnvelope, and mRate.
Referenced by Append(), Flush(), and HandleXMLEndTag().
bool WaveClip::WithinPlayRegion | ( | double | t | ) | const |
t ∈ [...)
Definition at line 1909 of file WaveClip.cpp.
References GetPlayEndTime(), and GetPlayStartTime().
Referenced by WaveClipUtilities::GetFloatAtTime(), PartlyWithinPlayRegion(), and WaveClipChannel::WithinPlayRegion().
void WaveClip::WriteXML | ( | size_t | ii, |
XMLWriter & | xmlFile | ||
) | const |
Wave clip data has always been written by channel-major iteration and is still done so for compatibility. Therefore, the first argument.
ii | identifies the channel |
ii < NChannels()
Definition at line 1066 of file WaveClip.cpp.
References CentShiftAttr, ClipStretchRatio_attr, WaveTrackUtilities::GetSequenceSamplesCount(), Name_attr, Offset_attr, PitchAndSpeedPreset_attr, RawAudioTempo_attr, TrimLeft_attr, TrimRight_attr, and WaveClipListener::WriteXMLAttributes().
Referenced by WaveClipChannel::WriteXML().
|
private |
Definition at line 950 of file WaveClip.h.
Referenced by GetCentShift(), HandleXMLTag(), and SetCentShift().
|
private |
Definition at line 954 of file WaveClip.h.
Referenced by GetStretchRatio(), HandleXMLTag(), Paste(), StretchBy(), and StretchLeftTo().
|
private |
Cut Lines are nothing more than ordinary wave clips, with the offset relative to the start of the clip.
Definition at line 973 of file WaveClip.h.
Referenced by AddCutLine(), CheckInvariants(), ClearAndAddCutLine(), CloseLock(), DiscardRightChannel(), ExpandCutLine(), FindCutLine(), HandleXMLChild(), MakeStereo(), OffsetCutLines(), Paste(), RemoveCutLine(), SplitChannels(), StretchCutLines(), SwapChannels(), WaveClip(), and WaveClip::ClearSequenceFinisher::~ClearSequenceFinisher().
|
private |
Envelope is unique, not per-sequence, and always non-null.
Definition at line 966 of file WaveClip.h.
Referenced by HandleXMLChild(), OnProjectTempoChange(), Paste(), SetEnvelope(), SetRate(), SetSequenceStartTime(), StretchBy(), StretchLeftTo(), UpdateEnvelopeTrackLen(), and WaveClip().
|
private |
Definition at line 976 of file WaveClip.h.
Referenced by WaveClip().
|
private |
Definition at line 978 of file WaveClip.h.
Referenced by GetName(), SetName(), and WaveClip().
|
private |
Definition at line 949 of file WaveClip.h.
Referenced by GetPitchAndSpeedPreset(), HandleXMLTag(), and SetPitchAndSpeedPreset().
|
private |
Definition at line 956 of file WaveClip.h.
Referenced by GetStretchRatio(), OnProjectTempoChange(), and Paste().
|
private |
Sample rate of the raw audio, i.e., before stretching.
Definition at line 959 of file WaveClip.h.
Referenced by GetPlayEndSample(), GetPlayEndTime(), GetPlayStartSample(), GetSequenceEndTime(), HandleXMLChild(), IsEmpty(), Paste(), Resample(), SamplesToTime(), SetRate(), SnapToTrackSample(), TimeToSamples(), UpdateEnvelopeTrackLen(), and WaveClip().
|
private |
Definition at line 955 of file WaveClip.h.
Referenced by GetStretchRatio(), HandleXMLTag(), OnProjectTempoChange(), Paste(), SetRawAudioTempo(), and TrimQuarternotesFromRight().
|
private |
Real-time durations, i.e., stretching the clip modifies these.
Definition at line 944 of file WaveClip.h.
Referenced by GetPlayEndTime(), GetPlayStartTime(), GetSequenceStartSample(), GetSequenceStartTime(), OnProjectTempoChange(), SetSequenceStartTime(), StretchBy(), StretchLeftTo(), TrimLeftTo(), and WaveClip().
|
private |
CheckInvariants()
Definition at line 964 of file WaveClip.h.
Referenced by Append(), AppendLegacySharedBlock(), AppendToChannel(), CheckInvariants(), ClearAndAddCutLine(), CloseLock(), ConvertToSampleFormat(), CountBlocks(), DiscardRightChannel(), Flush(), GetAppendBuffer(), GetAppendBufferLen(), GetBestBlockSize(), GetEmptySequenceCopies(), GetFactory(), GetMaxBlockSize(), GetMinMax(), GetNumSamples(), GetRMS(), GetSampleFormats(), GetSamples(), GetSampleView(), GetSequenceBlockArray(), GreatestAppendBufferLen(), HandleXMLChild(), HandleXMLEndTag(), InsertSilence(), MakeStereo(), NChannels(), Paste(), RepairChannels(), Resample(), SetSamples(), SetSilence(), StrongInvariant(), SwapChannels(), WaveClip::Transaction::Transaction(), TransferSequence(), and WaveClip().
|
private |
Definition at line 945 of file WaveClip.h.
Referenced by GetPlayStartTime(), GetSamples(), GetSampleView(), GetTrimLeft(), GetVisibleSampleCount(), OnProjectTempoChange(), SetPlayStartTime(), SetRate(), SetSamples(), SetSilence(), SetTrimLeft(), StretchBy(), StretchLeftTo(), TrimLeft(), TrimLeftTo(), WaveClip(), and WaveClip::Transaction::~Transaction().
|
private |
Definition at line 946 of file WaveClip.h.
Referenced by GetPlayEndTime(), GetTrimRight(), GetVisibleSampleCount(), OnProjectTempoChange(), SetRate(), SetTrimRight(), StretchBy(), StretchLeftTo(), TrimRight(), TrimRightTo(), WaveClip(), and WaveClip::Transaction::~Transaction().
|
static |
Definition at line 249 of file WaveClip.h.
Referenced by AUPImportFileHandle::HandleEnvelope(), AUPImportFileHandle::HandleWaveClip(), HandleXMLChild(), WaveTrack::HandleXMLChild(), HandleXMLEndTag(), WaveTrack::HandleXMLEndTag(), AUPImportFileHandle::HandleXMLEndTag(), HandleXMLTag(), and AUPImportFileHandle::HandleXMLTag().