1 #ifndef AUDIOGRAPHER_SINK_H
2 #define AUDIOGRAPHER_SINK_H
4 #include <boost/shared_ptr.hpp>
6 #include "process_context.h"
12 * This is a pure virtual interface for all data sinks in AudioGrapher
19 /** Process given data.
20 * The data can not be modified, so in-place processing is not allowed.
21 * At least this function must be implemented by deriving classes
23 virtual void process (ProcessContext<T> const & context) = 0;
25 /** Process given data
26 * Data may be modified, so in place processing is allowed.
27 * The default implementation calls the non-modifying version,
28 * so this function does not need to be overriden.
29 * However, if the sink can do in-place processing,
30 * overriding this is highly recommended.
32 * If this is not overridden adding "using Sink<T>::process;"
33 * to the deriving class declaration is suggested to avoid
34 * warnings about hidden virtual functions.
36 inline virtual void process (ProcessContext<T> & context)
38 this->process (static_cast<ProcessContext<T> const &> (context));
44 #endif // AUDIOGRAPHER_SINK_H