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 EffectStage::Acquire(), WideSampleSource::Acquire(), NormalizeBase::AnalyseTrackData(), TruncSilenceBase::Analyze(), CompareAudioCommand::Apply(), AutoDuckBase::ApplyDuckFade(), VoiceKey::CalibrateNoise(), Sequence::Delete(), WaveTrack::Disjoin(), AudioSegmentSampleView::DoAdd(), EffectStage::FetchProcessAndAdvance(), Sequence::Get(), NyquistBase::NyxContext::GetCallback(), WaveTrack::GetEnvelopeValues(), ClipSegment::GetFloats(), Sequence::GetFloatSampleView(), Sequence::GetMinMax(), ScrubbingPlaybackPolicy::GetPlaybackSlice(), anonymous_namespace{WaveTrack.cpp}::GetRenderedCopy(), Sequence::GetRMS(), anonymous_namespace{WaveChannelUtilities.cpp}::GetSampleAccessArgs(), ImportRaw(), MixerSource::MixSameRate(), MixerSource::MixVariableRates(), VoiceKey::OffBackward(), VoiceKey::OffForward(), VoiceKey::OnBackward(), VoiceKey::OnForward(), RealtimeEffectState::Process(), TrackSpectrumTransformer::Process(), AutoDuckBase::Process(), SBSMSBase::Process(), VampEffect::Process(), DtmfBase::Instance::ProcessBlock(), ChangeSpeedBase::ProcessOne(), ClickRemovalBase::ProcessOne(), FindClippingBase::ProcessOne(), EqualizationBase::ProcessOne(), EffectTwoPassSimpleMono::ProcessOne(), NormalizeBase::ProcessOne(), LoudnessBase::ProcessOne(), ClipTimeAndPitchSource::Pull(), WaveClip::Resample(), resampleCB(), anonymous_namespace{WaveTrackUtilities.cpp}::ReverseOneClip(), Sequence::SetSamples(), SelectHandle::StartSnappingFreqSelection(), VoiceKey::TestDirectionChanges(), VoiceKey::TestEnergy(), and VoiceKey::TestSignChanges().

Here is the call graph for this function: