summaryrefslogtreecommitdiff
path: root/libs/audiographer/audiographer/source.h
blob: 945cb13298d404419a9c1eff61e16bcab479ce96 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#ifndef AUDIOGRAPHER_SOURCE_H
#define AUDIOGRAPHER_SOURCE_H

#include "types.h"
#include "sink.h"

#include <boost/shared_ptr.hpp>

#include "audiographer/visibility.h"

namespace AudioGrapher
{

/** A source for data
  * This is a pure virtual interface for all data sources in AudioGrapher
  */
template<typename T>
class /*LIBAUDIOGRAPHER_API*/ Source
{
  public:
	virtual ~Source () { }
	
	typedef boost::shared_ptr<Sink<T> > SinkPtr;
	
	/// Adds an output to this source. All data generated is forwarded to \a output
	virtual void add_output (SinkPtr output) = 0;
	
	/// Removes all outputs added
	virtual void clear_outputs () = 0;
	
	/// Removes a specific output from this source
	virtual void remove_output (SinkPtr output) = 0;
};

} // namespace

#endif //AUDIOGRAPHER_SOURCE_H