Mercurial > hg > svcore
comparison data/fileio/WavFileWriter.h @ 1527:710e6250a401 zoom
Merge from default branch
author | Chris Cannam |
---|---|
date | Mon, 17 Sep 2018 13:51:14 +0100 |
parents | 954d0cf29ca7 |
children |
comparison
equal
deleted
inserted
replaced
1324:d4a28d1479a8 | 1527:710e6250a401 |
---|---|
11 published by the Free Software Foundation; either version 2 of the | 11 published by the Free Software Foundation; either version 2 of the |
12 License, or (at your option) any later version. See the file | 12 License, or (at your option) any later version. See the file |
13 COPYING included with this distribution for more information. | 13 COPYING included with this distribution for more information. |
14 */ | 14 */ |
15 | 15 |
16 #ifndef _WAV_FILE_WRITER_H_ | 16 #ifndef SV_WAV_FILE_WRITER_H |
17 #define _WAV_FILE_WRITER_H_ | 17 #define SV_WAV_FILE_WRITER_H |
18 | 18 |
19 #include <QString> | 19 #include <QString> |
20 | |
21 #ifdef Q_OS_WIN | |
22 #include <windows.h> | |
23 #define ENABLE_SNDFILE_WINDOWS_PROTOTYPES 1 | |
24 #endif | |
20 | 25 |
21 #include <sndfile.h> | 26 #include <sndfile.h> |
22 | 27 |
23 #include "base/BaseTypes.h" | 28 #include "base/BaseTypes.h" |
24 | 29 |
57 QString getPath() const { return m_path; } | 62 QString getPath() const { return m_path; } |
58 | 63 |
59 bool writeModel(DenseTimeValueModel *source, | 64 bool writeModel(DenseTimeValueModel *source, |
60 MultiSelection *selection = 0); | 65 MultiSelection *selection = 0); |
61 | 66 |
62 bool writeSamples(float **samples, sv_frame_t count); // count per channel | 67 /// Write samples from raw arrays; count is per-channel |
68 bool writeSamples(const float *const *samples, sv_frame_t count); | |
69 | |
70 /// As writeSamples, but compatible with WavFileReader api. More expensive. | |
71 bool putInterleavedFrames(const floatvec_t &frames); | |
63 | 72 |
64 bool close(); | 73 bool close(); |
65 | 74 |
66 protected: | 75 protected: |
67 QString m_path; | 76 QString m_path; |