Audacity 3.2.0
|
#include <WaveTrack.h>
Public Member Functions | |
WaveChannelInterval (WaveClip &wideClip, WaveClip &narrowClip, size_t iChannel) | |
Assume lifetime of this object nests in those of arguments. More... | |
~WaveChannelInterval () override | |
const WaveClip & | GetClip () const |
const Envelope & | GetEnvelope () const |
size_t | GetChannelIndex () const |
bool | Intersects (double t0, double t1) const |
double | Start () const |
double | End () const |
AudioSegmentSampleView | GetSampleView (double t0, double t1, bool mayThrow) const |
Request interval samples within [t0, t1). t0 and t1 are truncated to the interval 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... | |
sampleCount | GetVisibleSampleCount () const override |
int | GetRate () const override |
double | GetPlayStartTime () const override |
double | GetPlayEndTime () const override |
sampleCount | TimeToSamples (double time) const override |
double | GetStretchRatio () const override |
double | GetTrimLeft () const |
double | GetTrimRight () const |
bool | GetSamples (samplePtr buffer, sampleFormat format, sampleCount start, size_t len, bool mayThrow=true) const |
AudioSegmentSampleView | GetSampleView (sampleCount start, size_t length, bool mayThrow) const |
const Sequence & | GetSequence () const |
constSamplePtr | GetAppendBuffer () const |
size_t | GetAppendBufferLen () const |
int | GetColourIndex () const |
Public Member Functions inherited from ChannelInterval | |
virtual | ~ChannelInterval () |
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 |
Private Member Functions | |
const WaveClip & | GetNarrowClip () const |
Private Attributes | |
WaveClip & | mWideClip |
WaveClip & | mNarrowClip |
const size_t | miChannel |
Definition at line 66 of file WaveTrack.h.
|
inline |
Assume lifetime of this object nests in those of arguments.
Definition at line 72 of file WaveTrack.h.
|
overridedefault |
double WaveChannelInterval::End | ( | ) | const |
Definition at line 84 of file WaveTrack.cpp.
References GetNarrowClip(), and WaveClip::GetPlayEndTime().
constSamplePtr WaveChannelInterval::GetAppendBuffer | ( | ) | const |
Definition at line 168 of file WaveTrack.cpp.
References WaveClip::GetAppendBuffer(), and GetNarrowClip().
Referenced by WaveClipWaveformCache::GetWaveDisplay().
size_t WaveChannelInterval::GetAppendBufferLen | ( | ) | const |
Definition at line 174 of file WaveTrack.cpp.
References WaveClip::GetAppendBufferLen(), and GetNarrowClip().
Referenced by WaveClipWaveformCache::GetWaveDisplay().
|
inline |
Definition at line 81 of file WaveTrack.h.
Referenced by anonymous_namespace{SpectrumView.cpp}::DrawClipSpectrum(), WaveClipSpectrumCache::GetSpectrogram(), and WaveClipWaveformCache::GetWaveDisplay().
|
inline |
Definition at line 79 of file WaveTrack.h.
Referenced by anonymous_namespace{SpectrumView.cpp}::DrawClipSpectrum(), and anonymous_namespace{WaveformView.cpp}::DrawClipWaveform().
int WaveChannelInterval::GetColourIndex | ( | ) | const |
Definition at line 179 of file WaveTrack.cpp.
References WaveClip::GetColourIndex(), and GetNarrowClip().
Referenced by anonymous_namespace{WaveformView.cpp}::DrawClipWaveform().
const Envelope & WaveChannelInterval::GetEnvelope | ( | ) | const |
Definition at line 97 of file WaveTrack.cpp.
References WaveClip::GetEnvelope(), and mWideClip.
Referenced by anonymous_namespace{WaveformView.cpp}::DrawClipWaveform(), and anonymous_namespace{WaveformView.cpp}::DrawIndividualSamples().
|
inlineprivate |
Definition at line 124 of file WaveTrack.h.
Referenced by End(), GetAppendBuffer(), GetAppendBufferLen(), GetColourIndex(), GetPlayEndTime(), GetPlayStartTime(), GetRate(), GetSamples(), GetSampleView(), GetSequence(), GetStretchRatio(), GetTrimLeft(), GetTrimRight(), GetVisibleSampleCount(), Intersects(), Start(), and TimeToSamples().
|
overridevirtual |
Implements ClipTimes.
Definition at line 118 of file WaveTrack.cpp.
References GetNarrowClip(), and WaveClip::GetPlayEndTime().
|
overridevirtual |
Implements ClipTimes.
Definition at line 113 of file WaveTrack.cpp.
References GetNarrowClip(), and WaveClip::GetPlayStartTime().
Referenced by anonymous_namespace{SpectrumView.cpp}::DrawClipSpectrum(), anonymous_namespace{WaveformView.cpp}::DrawClipWaveform(), anonymous_namespace{WaveformView.cpp}::DrawIndividualSamples(), and anonymous_namespace{SpectrumView.cpp}::GetSelectedSampleIndices().
|
overridevirtual |
Implements ClipTimes.
Definition at line 108 of file WaveTrack.cpp.
References GetNarrowClip(), and WaveClip::GetRate().
Referenced by SpecCache::CalculateOneSpectrum(), anonymous_namespace{SpectrumView.cpp}::DrawClipSpectrum(), anonymous_namespace{WaveformView.cpp}::DrawClipWaveform(), anonymous_namespace{WaveformView.cpp}::DrawIndividualSamples(), WaveClipSpectrumCache::GetSpectrogram(), WaveClipWaveformCache::GetWaveDisplay(), and SpecCache::Populate().
bool WaveChannelInterval::GetSamples | ( | samplePtr | buffer, |
sampleFormat | format, | ||
sampleCount | start, | ||
size_t | len, | ||
bool | mayThrow = true |
||
) | const |
Definition at line 143 of file WaveTrack.cpp.
References anonymous_namespace{ExportPCM.cpp}::format, GetNarrowClip(), and WaveClip::GetSamples().
Referenced by anonymous_namespace{WaveformView.cpp}::DrawIndividualSamples().
AudioSegmentSampleView WaveChannelInterval::GetSampleView | ( | double | t0, |
double | t1, | ||
bool | mayThrow | ||
) | const |
Request interval samples within [t0, t1). t0
and t1
are truncated to the interval 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()
.
size_t
Definition at line 90 of file WaveTrack.cpp.
References GetNarrowClip(), WaveClip::GetSampleView(), and anonymous_namespace{StretchingSequenceIntegrationTest.cpp}::iChannel.
Referenced by SpecCache::CalculateOneSpectrum().
AudioSegmentSampleView WaveChannelInterval::GetSampleView | ( | sampleCount | start, |
size_t | length, | ||
bool | mayThrow | ||
) | const |
Definition at line 151 of file WaveTrack.cpp.
References GetNarrowClip(), and WaveClip::GetSampleView().
const Sequence & WaveChannelInterval::GetSequence | ( | ) | const |
Definition at line 159 of file WaveTrack.cpp.
References GetNarrowClip(), and WaveClip::GetSequence().
Referenced by SpecCache::CalculateOneSpectrum(), and WaveClipWaveformCache::GetWaveDisplay().
|
overridevirtual |
Implements ClipTimes.
Definition at line 128 of file WaveTrack.cpp.
References GetNarrowClip(), and WaveClip::GetStretchRatio().
Referenced by SpecCache::CalculateOneSpectrum(), anonymous_namespace{SpectrumView.cpp}::DrawClipSpectrum(), anonymous_namespace{WaveformView.cpp}::DrawClipWaveform(), anonymous_namespace{WaveformView.cpp}::DrawIndividualSamples(), WaveClipSpectrumCache::GetSpectrogram(), WaveClipWaveformCache::GetWaveDisplay(), and SpecCache::Populate().
double WaveChannelInterval::GetTrimLeft | ( | ) | const |
Definition at line 133 of file WaveTrack.cpp.
References GetNarrowClip(), and WaveClip::GetTrimLeft().
Referenced by WaveClipSpectrumCache::GetSpectrogram(), and WaveClipWaveformCache::GetWaveDisplay().
double WaveChannelInterval::GetTrimRight | ( | ) | const |
Definition at line 138 of file WaveTrack.cpp.
References GetNarrowClip(), and WaveClip::GetTrimRight().
Referenced by WaveClipSpectrumCache::GetSpectrogram().
|
overridevirtual |
The number of raw audio samples not hidden by trimming.
Implements ClipTimes.
Definition at line 103 of file WaveTrack.cpp.
References GetNarrowClip(), and WaveClip::GetVisibleSampleCount().
Referenced by anonymous_namespace{WaveformView.cpp}::DrawClipWaveform(), anonymous_namespace{WaveformView.cpp}::DrawIndividualSamples(), and anonymous_namespace{SpectrumView.cpp}::GetSelectedSampleIndices().
bool WaveChannelInterval::Intersects | ( | double | t0, |
double | t1 | ||
) | const |
Definition at line 74 of file WaveTrack.cpp.
References GetNarrowClip(), and WaveClip::IntersectsPlayRegion().
double WaveChannelInterval::Start | ( | ) | const |
Definition at line 79 of file WaveTrack.cpp.
References GetNarrowClip(), and WaveClip::GetPlayStartTime().
|
overridevirtual |
Implements ClipTimes.
Definition at line 123 of file WaveTrack.cpp.
References GetNarrowClip(), and WaveClip::TimeToSamples().
Referenced by anonymous_namespace{WaveformView.cpp}::DrawClipWaveform(), and anonymous_namespace{SpectrumView.cpp}::GetSelectedSampleIndices().
|
private |
Definition at line 128 of file WaveTrack.h.
|
private |
Definition at line 127 of file WaveTrack.h.
|
private |
Definition at line 126 of file WaveTrack.h.
Referenced by GetEnvelope().