aboutsummaryrefslogtreecommitdiffstats
path: root/src/dabplussnoop.hpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2017-05-05 10:19:54 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2017-05-05 10:19:54 +0200
commita57f21216cf5deb5dc30c1ab181fea91d15b0612 (patch)
treed64e28463c3f786d8c910757c6b9cf9750e01235 /src/dabplussnoop.hpp
parent5a863f88de5e63f1112e8701fa90f58e7de6b608 (diff)
downloadetisnoop-a57f21216cf5deb5dc30c1ab181fea91d15b0612.tar.gz
etisnoop-a57f21216cf5deb5dc30c1ab181fea91d15b0612.tar.bz2
etisnoop-a57f21216cf5deb5dc30c1ab181fea91d15b0612.zip
Fix wav file format on ctrl-C and use more RAII
Diffstat (limited to 'src/dabplussnoop.hpp')
-rw-r--r--src/dabplussnoop.hpp12
1 files changed, 7 insertions, 5 deletions
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;