Mercurial > hg > svcore
comparison data/fileio/WavFileWriter.h @ 674:920e3880f7b4
* Add TempWriteFile abstraction, use it when exporting audio to avoid clobbering existing file before export is complete
author | Chris Cannam |
---|---|
date | Tue, 29 Mar 2011 17:30:23 +0100 |
parents | b0f4555b625e |
children | bcca512445f3 |
comparison
equal
deleted
inserted
replaced
673:a1ae2c1f80ab | 674:920e3880f7b4 |
---|---|
20 | 20 |
21 #include <sndfile.h> | 21 #include <sndfile.h> |
22 | 22 |
23 class DenseTimeValueModel; | 23 class DenseTimeValueModel; |
24 class MultiSelection; | 24 class MultiSelection; |
25 class TempWriteFile; | |
25 | 26 |
26 class WavFileWriter | 27 class WavFileWriter |
27 { | 28 { |
28 public: | 29 public: |
29 WavFileWriter(QString path, size_t sampleRate, size_t channels); | 30 WavFileWriter(QString path, size_t sampleRate, size_t channels); |
44 | 45 |
45 protected: | 46 protected: |
46 QString m_path; | 47 QString m_path; |
47 size_t m_sampleRate; | 48 size_t m_sampleRate; |
48 size_t m_channels; | 49 size_t m_channels; |
50 TempWriteFile *m_temp; | |
49 SNDFILE *m_file; | 51 SNDFILE *m_file; |
50 QString m_error; | 52 QString m_error; |
51 }; | 53 }; |
52 | 54 |
53 | 55 |