aboutsummaryrefslogtreecommitdiffstats
path: root/src/dabplussnoop.hpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2017-07-03 17:20:35 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2017-07-03 17:20:35 +0200
commit4870d0c148eb49ffeb5482ae55d9cc4c9cc89786 (patch)
tree0009fbe559e7e38b1cb30b7095930cfce267a83c /src/dabplussnoop.hpp
parent777ef8b852aab3e95859b9042ddffb09818b28d2 (diff)
downloadetisnoop-4870d0c148eb49ffeb5482ae55d9cc4c9cc89786.tar.gz
etisnoop-4870d0c148eb49ffeb5482ae55d9cc4c9cc89786.tar.bz2
etisnoop-4870d0c148eb49ffeb5482ae55d9cc4c9cc89786.zip
Measure audio levels, add ensemble database WIP
Diffstat (limited to 'src/dabplussnoop.hpp')
-rw-r--r--src/dabplussnoop.hpp27
1 files changed, 11 insertions, 16 deletions
diff --git a/src/dabplussnoop.hpp b/src/dabplussnoop.hpp
index 8ba35d5..6322c9b 100644
--- a/src/dabplussnoop.hpp
+++ b/src/dabplussnoop.hpp
@@ -78,21 +78,12 @@ he_aac_super_frame(subchannel_index)
#include <vector>
#include "faad_decoder.hpp"
-#ifndef __DABPLUSSNOOP_H_
-#define __DABPLUSSNOOP_H_
+#pragma once
// DabPlusSnoop is responsible for decoding DAB+ audio
class DabPlusSnoop
{
public:
- 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)
{
m_subchannel_index = subchannel_index;
@@ -105,6 +96,8 @@ class DabPlusSnoop
void push(uint8_t* streamdata, size_t streamsize);
+ audio_statistics_t get_audio_statistics(void) const;
+
private:
/* Data needed for FAAD */
FaadDecoder m_faad_decoder;
@@ -132,11 +125,14 @@ class DabPlusSnoop
class StreamSnoop
{
public:
- StreamSnoop() :
+ StreamSnoop(bool dump_to_file) :
dps(),
m_index(-1),
- m_raw_data_stream_fd(NULL) {}
+ m_raw_data_stream_fd(nullptr),
+ m_dump_to_file(dump_to_file) {}
~StreamSnoop();
+ StreamSnoop(StreamSnoop&& other);
+
StreamSnoop(const StreamSnoop& other) = delete;
StreamSnoop& operator=(const StreamSnoop& other) = delete;
@@ -153,13 +149,12 @@ class StreamSnoop
void push(uint8_t* streamdata, size_t streamsize);
+ audio_statistics_t get_audio_statistics(void) const;
+
private:
DabPlusSnoop dps;
int m_index;
-
FILE* m_raw_data_stream_fd;
+ bool m_dump_to_file;
};
-
-#endif
-