diff options
Diffstat (limited to 'libs/audiographer/audiographer/sndfile_writer.h')
-rw-r--r-- | libs/audiographer/audiographer/sndfile_writer.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/libs/audiographer/audiographer/sndfile_writer.h b/libs/audiographer/audiographer/sndfile_writer.h new file mode 100644 index 0000000000..a92da982c1 --- /dev/null +++ b/libs/audiographer/audiographer/sndfile_writer.h @@ -0,0 +1,29 @@ +#ifndef AUDIOGRAPHER_SNDFILE_WRITER_H +#define AUDIOGRAPHER_SNDFILE_WRITER_H + +#include "sndfile_base.h" +#include "types.h" +#include "sink.h" + +namespace AudioGrapher +{ + +/// Template parameter specific parts of sndfile writer +template <typename T> +class SndfileWriter : public virtual SndfileBase, public Sink<T> +{ + public: + SndfileWriter (ChannelCount channels, nframes_t samplerate, int format, std::string const & path); + + void process (ProcessContext<T> const & c); + using Sink<T>::process; + + private: + + void init (); // Inits write function + sf_count_t (*write_func)(SNDFILE *, const T *, sf_count_t); +}; + +} // namespace + +#endif // AUDIOGRAPHER_SNDFILE_WRITER_H
\ No newline at end of file |