Audacity  3.0.3
Classes | Functions
SampleCount.h File Reference
#include <cstddef>
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 23 of file SampleCount.cpp.

24 {
25  return
26  std::min( sampleCount( bufferSize ), std::max( sampleCount(0), limit ) )
27  .as_size_t();
28 }

References min().

Referenced by EffectNormalize::AnalyseTrackData(), EffectTruncSilence::Analyze(), CompareAudioCommand::Apply(), EffectAutoDuck::ApplyDuckFade(), VoiceKey::CalibrateNoise(), Sequence::Delete(), WaveTrack::Disjoin(), BlockGenerator::GenerateTrack(), NyquistEffect::GetCallback(), WaveTrack::GetEnvelopeValues(), Sequence::GetMinMax(), ScrubbingPlaybackPolicy::GetPlaybackSlice(), Sequence::GetRMS(), ImportRaw(), Mixer::MixSameRate(), Mixer::MixVariableRates(), VoiceKey::OffBackward(), VoiceKey::OffForward(), VoiceKey::OnBackward(), VoiceKey::OnForward(), EffectAutoDuck::Process(), EffectSBSMS::Process(), VampEffect::Process(), TrackSpectrumTransformer::Process(), EffectDtmf::ProcessBlock(), EffectEqualization::ProcessOne(), EffectClickRemoval::ProcessOne(), EffectNoiseRemoval::ProcessOne(), EffectFindClipping::ProcessOne(), EffectLoudness::ProcessOne(), EffectNormalize::ProcessOne(), EffectChangeSpeed::ProcessOne(), EffectSimpleMono::ProcessOne(), EffectTwoPassSimpleMono::ProcessOne(), EffectReverse::ProcessOneClip(), Effect::ProcessTrack(), 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 76 of file SampleCount.h.

77 {
78  return !(a == b);
79 }

◆ operator%()

sampleCount operator% ( sampleCount  a,
sampleCount  b 
)
inline

Definition at line 121 of file SampleCount.h.

122 {
123  return sampleCount{ a } %= b;
124 }

◆ operator*()

sampleCount operator* ( sampleCount  a,
sampleCount  b 
)
inline

Definition at line 111 of file SampleCount.h.

112 {
113  return sampleCount{ a } *= b;
114 }

◆ operator+()

sampleCount operator+ ( sampleCount  a,
sampleCount  b 
)
inline

Definition at line 101 of file SampleCount.h.

102 {
103  return sampleCount{ a } += b;
104 }

◆ operator-()

sampleCount operator- ( sampleCount  a,
sampleCount  b 
)
inline

Definition at line 106 of file SampleCount.h.

107 {
108  return sampleCount{ a } -= b;
109 }

◆ operator/()

sampleCount operator/ ( sampleCount  a,
sampleCount  b 
)
inline

Definition at line 116 of file SampleCount.h.

117 {
118  return sampleCount{ a } /= b;
119 }

◆ operator<()

bool operator< ( sampleCount  a,
sampleCount  b 
)
inline

Definition at line 81 of file SampleCount.h.

82 {
83  return a.as_long_long() < b.as_long_long();
84 }

References sampleCount::as_long_long().

Here is the call graph for this function:

◆ operator<=()

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

Definition at line 96 of file SampleCount.h.

97 {
98  return !(b < a);
99 }

◆ operator==()

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

Definition at line 71 of file SampleCount.h.

72 {
73  return a.as_long_long() == b.as_long_long();
74 }

References sampleCount::as_long_long().

Here is the call graph for this function:

◆ operator>()

bool operator> ( sampleCount  a,
sampleCount  b 
)
inline

Definition at line 91 of file SampleCount.h.

92 {
93  return b < a;
94 }

◆ operator>=()

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

Definition at line 86 of file SampleCount.h.

87 {
88  return !(a < b);
89 }
sampleCount::as_long_long
long long as_long_long() const
Definition: SampleCount.h:47
min
int min(int a, int b)
Definition: CompareAudioCommand.cpp:106
sampleCount
Positions or offsets within audio files need a wide type.
Definition: SampleCount.h:18