diff options
author | Johnathan Corgan <johnathan@corganlabs.com> | 2014-04-06 02:55:57 -0700 |
---|---|---|
committer | Johnathan Corgan <johnathan@corganlabs.com> | 2014-04-06 02:55:57 -0700 |
commit | 38ec48293ca2fc424f171d3273eeb3f4b7384af5 (patch) | |
tree | 5e3fd7452e33d5b29731bd4e96bbeb6b503330b0 | |
parent | f5dd2ac039e50f1a2655070813843524acf72f33 (diff) | |
parent | c3ef245e71e3adcb537a1d635227e30f4b12f4d5 (diff) |
Merge branch 'maint'
-rw-r--r-- | gr-blocks/lib/wavfile_sink_impl.cc | 10 | ||||
-rw-r--r-- | gr-blocks/lib/wavfile_sink_impl.h | 3 |
2 files changed, 12 insertions, 1 deletions
diff --git a/gr-blocks/lib/wavfile_sink_impl.cc b/gr-blocks/lib/wavfile_sink_impl.cc index 9a96f7ca3d..57bdb5f291 100644 --- a/gr-blocks/lib/wavfile_sink_impl.cc +++ b/gr-blocks/lib/wavfile_sink_impl.cc @@ -164,11 +164,19 @@ namespace gr { wavfile_sink_impl::~wavfile_sink_impl() { + stop(); + } + + bool wavfile_sink_impl::stop() + { if(d_new_fp) { - fclose(d_new_fp); + fclose(d_new_fp); + d_new_fp = NULL; } close(); + + return true; } int diff --git a/gr-blocks/lib/wavfile_sink_impl.h b/gr-blocks/lib/wavfile_sink_impl.h index 52dfd2259b..0e77f9799e 100644 --- a/gr-blocks/lib/wavfile_sink_impl.h +++ b/gr-blocks/lib/wavfile_sink_impl.h @@ -67,6 +67,9 @@ namespace gr { */ void close_wav(); + protected: + bool stop(); + public: wavfile_sink_impl(const char *filename, int n_channels, |