1 #ifndef AUDIOGRAPHER_TMP_FILE_H
2 #define AUDIOGRAPHER_TMP_FILE_H
4 #include "sndfile_writer.h"
5 #include "sndfile_reader.h"
10 /// A temporary file deleted after this class is destructed
11 template<typename T = DefaultSampleType>
12 class TmpFile : public SndfileWriter<T>, public SndfileReader<T>
16 TmpFile (int format, ChannelCount channels, framecnt_t samplerate)
17 : SndfileHandle (fileno (tmpfile()), true, SndfileBase::ReadWrite, format, channels, samplerate)
20 TmpFile (TmpFile const & other) : SndfileHandle (other) {}
21 using SndfileHandle::operator=;
27 #endif // AUDIOGRAPHER_TMP_FILE_H