From a57f21216cf5deb5dc30c1ab181fea91d15b0612 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Fri, 5 May 2017 10:19:54 +0200 Subject: Fix wav file format on ctrl-C and use more RAII --- src/dabplussnoop.hpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/dabplussnoop.hpp') diff --git a/src/dabplussnoop.hpp b/src/dabplussnoop.hpp index 8efc481..8ba35d5 100644 --- a/src/dabplussnoop.hpp +++ b/src/dabplussnoop.hpp @@ -1,5 +1,5 @@ /* - Copyright (C) 2016 Matthias P. Braendli (http://www.opendigitalradio.org) + Copyright (C) 2017 Matthias P. Braendli (http://www.opendigitalradio.org) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -89,6 +89,9 @@ class DabPlusSnoop m_index(0), m_subchannel_index(0), m_data(0) {} + ~DabPlusSnoop(); + DabPlusSnoop(const DabPlusSnoop& other) = delete; + DabPlusSnoop& operator=(const DabPlusSnoop& other) = delete; void set_subchannel_index(unsigned subchannel_index) { @@ -102,8 +105,6 @@ class DabPlusSnoop void push(uint8_t* streamdata, size_t streamsize); - void close(void); - private: /* Data needed for FAAD */ FaadDecoder m_faad_decoder; @@ -135,6 +136,9 @@ class StreamSnoop dps(), m_index(-1), m_raw_data_stream_fd(NULL) {} + ~StreamSnoop(); + StreamSnoop(const StreamSnoop& other) = delete; + StreamSnoop& operator=(const StreamSnoop& other) = delete; void set_subchannel_index(unsigned subchannel_index) { @@ -149,8 +153,6 @@ class StreamSnoop void push(uint8_t* streamdata, size_t streamsize); - void close(void); - private: DabPlusSnoop dps; int m_index; -- cgit v1.2.3