Audacity  3.0.3
Functions
SampleCount.cpp File Reference
#include "SampleCount.h"
#include <algorithm>
#include <limits>
#include <wx/debug.h>
Include dependency graph for SampleCount.cpp:

Go to the source code of this file.

Functions

size_t limitSampleBufferSize (size_t bufferSize, sampleCount limit)
 

Function Documentation

◆ limitSampleBufferSize()

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(), AudioIO::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:
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