Audacity 3.2.0
SilenceSegment.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: GPL-2.0-or-later */
2/*!********************************************************************
3
4 Audacity: A Digital Audio Editor
5
6 SilenceSegment.h
7
8 Matthieu Hodgkinson
9
10**********************************************************************/
11#pragma once
12
13#include "AudioSegment.h"
14
15#include "SampleCount.h"
16
17class STRETCHING_SEQUENCE_API SilenceSegment final : public AudioSegment
18{
19public:
20 SilenceSegment(size_t numChannels, sampleCount numSamples);
21 size_t GetFloats(float *const *buffers, size_t numSamples) override;
22 bool Empty() const override;
23 size_t NChannels() const override;
24
25private:
26 const size_t mNumChannels;
28};
A generalization for audio segments, whether clips or silence between clips.
Definition: AudioSegment.h:23
virtual size_t GetFloats(float *const *buffers, size_t numSamples)=0
Fills buffers with as many as numSamples or the number of remaining samples, whichever is smaller.
virtual bool Empty() const =0
Whether the segment has no more samples to provide.
virtual size_t NChannels() const =0
The number of channels in the segment.
sampleCount mNumRemainingSamples
const size_t mNumChannels
Positions or offsets within audio files need a wide type.
Definition: SampleCount.h:19