Ardour  9.0-pre0-582-g084a23a80d
audiographer/audiographer/source.h
Go to the documentation of this file.
1 #ifndef AUDIOGRAPHER_SOURCE_H
2 #define AUDIOGRAPHER_SOURCE_H
3 
4 #include <memory>
5 
6 #include "types.h"
7 #include "sink.h"
8 
10 
11 namespace AudioGrapher
12 {
13 
17 template<typename T>
19 {
20  public:
21  virtual ~Source () { }
22 
23  typedef std::shared_ptr<Sink<T> > SinkPtr;
24 
26  virtual void add_output (SinkPtr output) = 0;
27 
29  virtual void clear_outputs () = 0;
30 
32  virtual void remove_output (SinkPtr output) = 0;
33 };
34 
35 } // namespace
36 
37 #endif //AUDIOGRAPHER_SOURCE_H
38 
virtual void add_output(SinkPtr output)=0
Adds an output to this source. All data generated is forwarded to output.
virtual void clear_outputs()=0
Removes all outputs added.
std::shared_ptr< Sink< T > > SinkPtr
virtual void remove_output(SinkPtr output)=0
Removes a specific output from this source.