Audacity 3.2.0
AudioGraphSink.h
Go to the documentation of this file.
1/**********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5 @file AudioGraphSink.h
6 @brief abstract consumer of sample streams, taking Buffers as external context
7
8 Dominic Mazzoni
9 Vaughan Johnson
10
11 Paul Licameli split from PerTrackEffect.h
12
13**********************************************************************/
14#ifndef __AUDACITY_AUDIO_GRAPH_SINK__
15#define __AUDACITY_AUDIO_GRAPH_SINK__
16
17#include <cstddef>
18
19namespace AudioGraph {
20
21class Buffers;
22
24class AUDIO_GRAPH_API Sink {
25public:
27
28 virtual ~Sink();
29
30 virtual bool AcceptsBuffers(const Buffers &buffers) const = 0;
31
33
37 virtual bool Acquire(Buffers &data) = 0;
39
44 virtual bool Release(const Buffers &data, size_t curBlockSize) = 0;
45};
46
47}
48#endif
Accumulates (non-interleaved) data during effect processing.
Downstream receiver of sample streams, taking Buffers as external context.
virtual bool Acquire(Buffers &data)=0
Guarantee empty space in Buffers before they are written.
virtual bool AcceptsBuffers(const Buffers &buffers) const =0
virtual bool Release(const Buffers &data, size_t curBlockSize)=0
Acknowledge receipt of data in Buffers, which caller may then Advance()