Audacity 3.2.0
Functions
SampleCount.cpp File Reference
#include "SampleCount.h"
#include <algorithm>
#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 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(), RealtimeEffectState::Process(), TrackSpectrumTransformer::Process(), EffectAutoDuck::Process(), EffectSBSMS::Process(), VampEffect::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: