MCPcopy Create free account
hub / github.com/audacity/audacity / GetNumSamplesInView

Function GetNumSamplesInView

src/MixerBoard.cpp:497–504  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

495
496namespace {
497size_t GetNumSamplesInView(const ChannelSampleView& view)
498{
499 return std::accumulate(
500 view.begin(), view.end(), 0,
501 [](size_t total, const AudioSegmentSampleView& segmentView) {
502 return total + segmentView.GetSampleCount();
503 });
504}
505
506// Assumes that buffer has capacity >= GetNumSamplesInView(view)
507void FillBufferWithSampleView(float* buffer, const ChannelSampleView& view)

Callers 1

UpdateMeterMethod · 0.85

Calls 3

beginMethod · 0.45
endMethod · 0.45
GetSampleCountMethod · 0.45

Tested by

no test coverage detected