1 #ifndef AUDIOGRAPHER_LISTED_SOURCE_H
2 #define AUDIOGRAPHER_LISTED_SOURCE_H
15 template<
typename T = DefaultSampleType>
25 typedef std::list<typename Source<T>::SinkPtr>
SinkList;
30 for (
typename SinkList::iterator i = outputs.begin(); i != outputs.end(); ++i) {
37 if (output_size_is_one()) {
39 outputs.front()->process (c);
45 inline bool output_size_is_one () {
return (!outputs.empty() && ++outputs.begin() == outputs.end()); }
#define LIBAUDIOGRAPHER_API
An generic Source that uses a std::list for managing outputs.
void clear_outputs()
Removes all outputs added.
void remove_output(typename Source< T >::SinkPtr output)
bool output_size_is_one()
void add_output(typename Source< T >::SinkPtr output)
std::list< typename Source< T >::SinkPtr > SinkList
void output(ProcessContext< T > &c)
void output(ProcessContext< T > const &c)
Helper for derived classes.
std::shared_ptr< Sink< T > > SinkPtr