Audacity 3.2.0
MockPlayableSequence.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 MockPlayableSequence.h
7
8 Matthieu Hodgkinson
9
10**********************************************************************/
11#pragma once
12
13#include "AudioIOSequences.h"
14
16{
17public:
21 {
22 }
23
24 // WideSampleSequence
25 bool DoGet(
26 size_t iChannel, size_t nBuffers, const samplePtr buffers[],
27 sampleFormat format, sampleCount start, size_t len, bool backwards,
28 fillFormat fill = FillFormat::fillZero, bool mayThrow = true,
29 sampleCount* pNumWithinClips = nullptr) const override
30 {
31 return true;
32 }
33
34 size_t NChannels() const override
35 {
36 return numChannels;
37 }
38
39 float GetChannelGain(int channel) const override
40 {
41 return 1.f;
42 }
43
44 double GetStartTime() const override
45 {
46 return 0.;
47 }
48
49 double GetEndTime() const override
50 {
51 return 0.;
52 }
53
54 double GetRate() const override
55 {
56 return sampleRate;
57 }
58
60 {
61 return floatSample;
62 }
63
64 bool HasTrivialEnvelope() const override
65 {
66 return true;
67 }
68
70 double* buffer, size_t bufferLen, double t0,
71 bool backwards) const override
72 {
73 }
74
75 // AudioGraph::Channel
77 {
79 }
80
81 // PlayableSequence
82 const ChannelGroup *FindChannelGroup() const override
83 {
84 return nullptr;
85 }
86
87 bool GetSolo() const override
88 {
89 return false;
90 }
91
92 bool GetMute() const override
93 {
94 return false;
95 }
96
97 const int sampleRate;
98 const size_t numChannels;
99};
sampleFormat
The ordering of these values with operator < agrees with the order of increasing bit width.
Definition: SampleFormat.h:30
char * samplePtr
Definition: SampleFormat.h:57
enum FillFormat fillFormat
bool HasTrivialEnvelope() const override
sampleFormat WidestEffectiveFormat() const override
bool DoGet(size_t iChannel, size_t nBuffers, const samplePtr buffers[], sampleFormat format, sampleCount start, size_t len, bool backwards, fillFormat fill=FillFormat::fillZero, bool mayThrow=true, sampleCount *pNumWithinClips=nullptr) const override
const ChannelGroup * FindChannelGroup() const override
Find associated ChannelGroup if any.
double GetStartTime() const override
float GetChannelGain(int channel) const override
double GetRate() const override
void GetEnvelopeValues(double *buffer, size_t bufferLen, double t0, bool backwards) const override
bool GetMute() const override
May vary asynchronously.
AudioGraph::ChannelType GetChannelType() const override
Classify this channel.
size_t NChannels() const override
A constant property.
double GetEndTime() const override
MockPlayableSequence(int sampleRate, size_t numChannels)
bool GetSolo() const override
May vary asynchronously.
Positions or offsets within audio files need a wide type.
Definition: SampleCount.h:19
ChannelType
Mutually exclusive channel classifications.