Audacity 3.2.0
TestWaveClipMaker.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 TestWaveClipMaker.h
7
8 Matthieu Hodgkinson
9
10**********************************************************************/
11#pragma once
12
13#include "AudioContainer.h"
14#include "SampleFormat.h"
15#include "WaveClip.h"
16#include "WaveTrack.h"
17
19
21{
22public:
24
25 using Operations = std::function<void(WaveClip&)>;
26
28 const std::vector<std::vector<float>>& values,
29 Operations operations = [](WaveClip&) {}) const;
30
32 const std::vector<float>& values, size_t numChannels,
33 Operations operations = [](WaveClip&) {}) const;
34
36 float value, size_t numValues, size_t numChannels,
37 Operations operations = [](WaveClip&) {}) const;
38
39private:
40 static constexpr bool copyCutLines = false;
41
42 const int mSampleRate;
44};
const wxChar * values
std::shared_ptr< SampleBlockFactory > SampleBlockFactoryPtr
Definition: SampleBlock.h:31
std::shared_ptr< WaveClip > WaveClipHolder
Definition: WaveClip.h:43
abstract base class with methods to produce SampleBlock objects
Definition: SampleBlock.h:115
static constexpr bool copyCutLines
const SampleBlockFactoryPtr mFactory
WaveClipHolder ClipFilledWith(const std::vector< std::vector< float > > &values, Operations operations=[](WaveClip &) {}) const
TestWaveClipMaker(int sampleRate, SampleBlockFactoryPtr)
std::function< void(WaveClip &)> Operations
This allows multiple clips to be a part of one WaveTrack.
Definition: WaveClip.h:238