Mercurial > hg > svcore
diff 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 |
line wrap: on
line diff
--- a/data/fileio/WavFileWriter.h Mon Dec 12 15:18:52 2016 +0000 +++ b/data/fileio/WavFileWriter.h Mon Sep 17 13:51:14 2018 +0100 @@ -13,11 +13,16 @@ COPYING included with this distribution for more information. */ -#ifndef _WAV_FILE_WRITER_H_ -#define _WAV_FILE_WRITER_H_ +#ifndef SV_WAV_FILE_WRITER_H +#define SV_WAV_FILE_WRITER_H #include <QString> +#ifdef Q_OS_WIN +#include <windows.h> +#define ENABLE_SNDFILE_WINDOWS_PROTOTYPES 1 +#endif + #include <sndfile.h> #include "base/BaseTypes.h" @@ -59,7 +64,11 @@ bool writeModel(DenseTimeValueModel *source, MultiSelection *selection = 0); - bool writeSamples(float **samples, sv_frame_t count); // count per channel + /// Write samples from raw arrays; count is per-channel + bool writeSamples(const float *const *samples, sv_frame_t count); + + /// As writeSamples, but compatible with WavFileReader api. More expensive. + bool putInterleavedFrames(const floatvec_t &frames); bool close();