Remove all use of nframes_t.
[ardour.git] / libs / audiographer / audiographer / sndfile / tmp_file.h
1 #ifndef AUDIOGRAPHER_TMP_FILE_H
2 #define AUDIOGRAPHER_TMP_FILE_H
3
4 #include "sndfile_writer.h"
5 #include "sndfile_reader.h"
6
7 namespace AudioGrapher
8 {
9
10 /// A temporary file deleted after this class is destructed
11 template<typename T = DefaultSampleType>
12 class TmpFile : public SndfileWriter<T>, public SndfileReader<T>
13 {
14   public:
15         
16         TmpFile (int format, ChannelCount channels, framecnt_t samplerate)
17           : SndfileHandle (fileno (tmpfile()), true, SndfileBase::ReadWrite, format, channels, samplerate)
18         {}
19         
20         TmpFile (TmpFile const & other) : SndfileHandle (other) {}
21         using SndfileHandle::operator=;
22         
23 };
24
25 } // namespace
26
27 #endif // AUDIOGRAPHER_TMP_FILE_H