diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2015-12-20 17:24:31 +0100 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2015-12-20 17:24:31 +0100 |
commit | 64e5faf11c22c8aabf181288293c8ec7964c213d (patch) | |
tree | f0669001e9eef2aa883df85f401947d843f684b4 /drumgizmo/output/wavfile | |
parent | b697682bd3c1b9cdfde97cd6a7c9d0f10103f6b4 (diff) | |
parent | 0fa481dabf620181c852f43923a3c4b049294ab4 (diff) |
Merge remote-tracking branch 'origin/master' into uirefactor
Diffstat (limited to 'drumgizmo/output/wavfile')
-rw-r--r-- | drumgizmo/output/wavfile/wavfile.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drumgizmo/output/wavfile/wavfile.cc b/drumgizmo/output/wavfile/wavfile.cc index fa4128e..8401f80 100644 --- a/drumgizmo/output/wavfile/wavfile.cc +++ b/drumgizmo/output/wavfile/wavfile.cc @@ -28,6 +28,7 @@ #include <audiotypes.h> #include <string> +#include <memory.h> #include <sndfile.h> @@ -48,8 +49,8 @@ public: private: SF_INFO sf_info; - SNDFILE **fh; - size_t channels; + SNDFILE **fh{nullptr}; + size_t channels{0}; // Parameters std::string filename; @@ -60,6 +61,7 @@ WavFile::WavFile() fh = NULL; filename = "output"; + memset(&sf_info, 0, sizeof(sf_info)); sf_info.channels = 1;//channels; sf_info.format = SF_FORMAT_WAV | SF_FORMAT_FLOAT; sf_info.samplerate = 44100; |