summaryrefslogtreecommitdiff
path: root/drumgizmo/output/wavfile/wavfile.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2015-12-20 16:55:52 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2015-12-20 16:55:52 +0100
commitc4f5bbfab513cd5291fbec7f0781be18c9aeb4f4 (patch)
treea2bf831e2d5c405ddede156f9468b05e9cc98516 /drumgizmo/output/wavfile/wavfile.cc
parent02321ff4d595db763074080b3e55d040fc403a99 (diff)
Fix uninitialised warning.
Diffstat (limited to 'drumgizmo/output/wavfile/wavfile.cc')
-rw-r--r--drumgizmo/output/wavfile/wavfile.cc6
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;