Audacity 3.2.0
AudioIOSequences.h
Go to the documentation of this file.
1/**********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5 AudioIOSequences.h
6
7 Paul Licameli
8
9 @brief interfaces for playable and recordable sample channel groups
10
11**********************************************************************/
12#ifndef __AUDACITY_AUDIO_IO_SEQUENCES__
13#define __AUDACITY_AUDIO_IO_SEQUENCES__
14
15#include "WideSampleSequence.h"
16class ChannelGroup;
17
24
26 virtual const ChannelGroup *FindChannelGroup() const = 0;
27
29 virtual bool GetSolo() const = 0;
30
32 virtual bool GetMute() const = 0;
33};
34
36 std::vector<std::shared_ptr<const PlayableSequence>>;
37
42struct MIXER_API RecordableSequence {
44 virtual sampleFormat GetSampleFormat() const = 0;
45 virtual double GetRate() const = 0;
46
48
51 virtual size_t NChannels() const = 0;
52
58 virtual bool Append(size_t iChannel,
60 size_t len,
61 unsigned int stride,
62 sampleFormat effectiveFormat
68 ) = 0;
69
71 virtual void Flush() = 0;
72
75 virtual void RepairChannels() = 0;
76
77 virtual void InsertSilence(double t, double len) = 0;
78};
79
80using RecordableSequences = std::vector<std::shared_ptr<RecordableSequence>>;
81
83class MIXER_API OtherPlayableSequence
84{
85public:
87};
88
89#endif
std::vector< std::shared_ptr< RecordableSequence > > RecordableSequences
std::vector< std::shared_ptr< const PlayableSequence > > ConstPlayableSequences
sampleFormat
The ordering of these values with operator < agrees with the order of increasing bit width.
Definition: SampleFormat.h:30
const char * constSamplePtr
Definition: SampleFormat.h:58
This is defined just to enable dynamic_cast on it.
virtual ~OtherPlayableSequence()
virtual const ChannelGroup * FindChannelGroup() const =0
Find associated ChannelGroup if any.
virtual bool GetSolo() const =0
May vary asynchronously.
virtual bool GetMute() const =0
May vary asynchronously.
~PlayableSequence() override
virtual size_t NChannels() const =0
A constant property.
virtual ~RecordableSequence()
virtual double GetRate() const =0
virtual void InsertSilence(double t, double len)=0
virtual bool Append(size_t iChannel, constSamplePtr buffer, sampleFormat format, size_t len, unsigned int stride, sampleFormat effectiveFormat)=0
Append the sample data to the track. You must call Flush() after the last Append.
virtual void Flush()=0
Flush must be called after last Append.
virtual sampleFormat GetSampleFormat() const =0
virtual void RepairChannels()=0