Audacity 3.2.0
Classes | Functions
SampleCount.h File Reference
#include <cstddef>
#include <limits>
Include dependency graph for SampleCount.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  sampleCount
 Positions or offsets within audio files need a wide type. More...
 

Functions

bool operator== (sampleCount a, sampleCount b)
 
bool operator!= (sampleCount a, sampleCount b)
 
bool operator< (sampleCount a, sampleCount b)
 
bool operator>= (sampleCount a, sampleCount b)
 
bool operator> (sampleCount a, sampleCount b)
 
bool operator<= (sampleCount a, sampleCount b)
 
sampleCount operator+ (sampleCount a, sampleCount b)
 
sampleCount operator- (sampleCount a, sampleCount b)
 
sampleCount operator* (sampleCount a, sampleCount b)
 
sampleCount operator/ (sampleCount a, sampleCount b)
 
sampleCount operator% (sampleCount a, sampleCount b)
 
MATH_API size_t limitSampleBufferSize (size_t bufferSize, sampleCount limit)
 

Function Documentation

◆ limitSampleBufferSize()

MATH_API size_t limitSampleBufferSize ( size_t  bufferSize,
sampleCount  limit 
)

Definition at line 22 of file SampleCount.cpp.

23{
24 return
25 std::min( sampleCount( bufferSize ), std::max( sampleCount(0), limit ) )
26 .as_size_t();
27}
int min(int a, int b)
Positions or offsets within audio files need a wide type.
Definition: SampleCount.h:19

References min().

Referenced by AudioGraph::EffectStage::Acquire(), SampleTrackSource::Acquire(), EffectNormalize::AnalyseTrackData(), EffectTruncSilence::Analyze(), CompareAudioCommand::Apply(), EffectAutoDuck::ApplyDuckFade(), VoiceKey::CalibrateNoise(), Sequence::Delete(), WaveTrack::Disjoin(), AudioGraph::EffectStage::FetchProcessAndAdvance(), BlockGenerator::GenerateTrack(), NyquistEffect::GetCallback(), WaveTrack::GetEnvelopeValues(), Sequence::GetMinMax(), ScrubbingPlaybackPolicy::GetPlaybackSlice(), Sequence::GetRMS(), ImportRaw(), MixerSource::MixSameRate(), MixerSource::MixVariableRates(), VoiceKey::OffBackward(), VoiceKey::OffForward(), VoiceKey::OnBackward(), VoiceKey::OnForward(), TrackSpectrumTransformer::Process(), EffectAutoDuck::Process(), EffectSBSMS::Process(), VampEffect::Process(), RealtimeEffectState::Process(), EffectDtmf::Instance::ProcessBlock(), EffectEqualization::ProcessOne(), EffectClickRemoval::ProcessOne(), EffectNoiseRemoval::ProcessOne(), EffectFindClipping::ProcessOne(), EffectLoudness::ProcessOne(), EffectNormalize::ProcessOne(), EffectChangeSpeed::ProcessOne(), EffectSimpleMono::ProcessOne(), EffectTwoPassSimpleMono::ProcessOne(), EffectReverse::ProcessOneClip(), WaveClip::Resample(), resampleCB(), Sequence::SetSamples(), SelectHandle::StartSnappingFreqSelection(), VoiceKey::TestDirectionChanges(), VoiceKey::TestEnergy(), and VoiceKey::TestSignChanges().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator!=()

bool operator!= ( sampleCount  a,
sampleCount  b 
)
inline

Definition at line 80 of file SampleCount.h.

81{
82 return !(a == b);
83}

◆ operator%()

sampleCount operator% ( sampleCount  a,
sampleCount  b 
)
inline

Definition at line 125 of file SampleCount.h.

126{
127 return sampleCount{ a } %= b;
128}

◆ operator*()

sampleCount operator* ( sampleCount  a,
sampleCount  b 
)
inline

Definition at line 115 of file SampleCount.h.

116{
117 return sampleCount{ a } *= b;
118}

◆ operator+()

sampleCount operator+ ( sampleCount  a,
sampleCount  b 
)
inline

Definition at line 105 of file SampleCount.h.

106{
107 return sampleCount{ a } += b;
108}

◆ operator-()

sampleCount operator- ( sampleCount  a,
sampleCount  b 
)
inline

Definition at line 110 of file SampleCount.h.

111{
112 return sampleCount{ a } -= b;
113}

◆ operator/()

sampleCount operator/ ( sampleCount  a,
sampleCount  b 
)
inline

Definition at line 120 of file SampleCount.h.

121{
122 return sampleCount{ a } /= b;
123}

◆ operator<()

bool operator< ( sampleCount  a,
sampleCount  b 
)
inline

Definition at line 85 of file SampleCount.h.

86{
87 return a.as_long_long() < b.as_long_long();
88}
long long as_long_long() const
Definition: SampleCount.h:48

References sampleCount::as_long_long().

Here is the call graph for this function:

◆ operator<=()

bool operator<= ( sampleCount  a,
sampleCount  b 
)
inline

Definition at line 100 of file SampleCount.h.

101{
102 return !(b < a);
103}

◆ operator==()

bool operator== ( sampleCount  a,
sampleCount  b 
)
inline

Definition at line 75 of file SampleCount.h.

76{
77 return a.as_long_long() == b.as_long_long();
78}

References sampleCount::as_long_long().

Here is the call graph for this function:

◆ operator>()

bool operator> ( sampleCount  a,
sampleCount  b 
)
inline

Definition at line 95 of file SampleCount.h.

96{
97 return b < a;
98}

◆ operator>=()

bool operator>= ( sampleCount  a,
sampleCount  b 
)
inline

Definition at line 90 of file SampleCount.h.

91{
92 return !(a < b);
93}