Audacity 3.2.0
AudioSegmentFactory.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 AudioSegmentFactory.h
7
8 Matthieu Hodgkinson
9
10**********************************************************************/
11
12#pragma once
13
15#include "ClipInterface.h"
17
18#include <memory>
19
20class ClipInterface;
21using ClipConstHolders = std::vector<std::shared_ptr<const ClipInterface>>;
22
23class STRETCHING_SEQUENCE_API AudioSegmentFactory final :
25{
26public:
27 AudioSegmentFactory(int sampleRate, int numChannels, ClipConstHolders clips);
28
29 std::vector<std::shared_ptr<AudioSegment>> CreateAudioSegmentSequence(
30 double playbackStartTime, PlaybackDirection) override;
31
32private:
33 std::vector<std::shared_ptr<AudioSegment>>
34 CreateAudioSegmentSequenceForward(double playbackStartTime);
35
36 std::vector<std::shared_ptr<AudioSegment>>
37 CreateAudioSegmentSequenceBackward(double playbackStartTime);
38
39private:
41 const int mSampleRate;
42 const int mNumChannels;
43};
std::vector< std::shared_ptr< const ClipInterface > > ClipConstHolders
PlaybackDirection
const ClipConstHolders mClips
virtual std::vector< std::shared_ptr< AudioSegment > > CreateAudioSegmentSequence(double playbackStartTime, PlaybackDirection)=0