diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2017-07-07 12:24:54 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2017-07-07 12:24:54 +0200 |
commit | ea355c46d1e57cb06384e7418bb0b3e539e36852 (patch) | |
tree | 035089d590549896d06feb6b780311c7a5e48177 | |
parent | 1d92e548f75b9fa6b5f3322ffa0658e0006c324b (diff) | |
download | etisnoop-ea355c46d1e57cb06384e7418bb0b3e539e36852.tar.gz etisnoop-ea355c46d1e57cb06384e7418bb0b3e539e36852.tar.bz2 etisnoop-ea355c46d1e57cb06384e7418bb0b3e539e36852.zip |
Do not write wav files in statistics mode
-rw-r--r-- | src/dabplussnoop.cpp | 4 | ||||
-rw-r--r-- | src/dabplussnoop.hpp | 9 |
2 files changed, 11 insertions, 2 deletions
diff --git a/src/dabplussnoop.cpp b/src/dabplussnoop.cpp index 228016d..f6bb8ac 100644 --- a/src/dabplussnoop.cpp +++ b/src/dabplussnoop.cpp @@ -299,7 +299,9 @@ bool DabPlusSnoop::analyse_au(vector<vector<uint8_t> >& aus) { stringstream ss_filename; - ss_filename << "stream-" << m_index; + if (m_write_to_wav_file) { + ss_filename << "stream-" << m_index; + } if (!m_faad_decoder.is_initialised()) { m_faad_decoder.open(ss_filename.str(), m_ps_flag, diff --git a/src/dabplussnoop.hpp b/src/dabplussnoop.hpp index cb7d9ec..6619436 100644 --- a/src/dabplussnoop.hpp +++ b/src/dabplussnoop.hpp @@ -89,6 +89,10 @@ class DabPlusSnoop m_subchannel_index = subchannel_index; } + void enable_wav_file_output(bool enable) { + m_write_to_wav_file = enable; + } + void set_index(int index) { m_index = index; @@ -102,6 +106,7 @@ class DabPlusSnoop /* Data needed for FAAD */ FaadDecoder m_faad_decoder; int m_index; + bool m_write_to_wav_file; bool m_ps_flag; bool m_aac_channel_mode; @@ -129,7 +134,9 @@ class StreamSnoop dps(), m_index(-1), m_raw_data_stream_fd(nullptr), - m_dump_to_file(dump_to_file) {} + m_dump_to_file(dump_to_file) { + dps.enable_wav_file_output(dump_to_file); + } ~StreamSnoop(); StreamSnoop(StreamSnoop&& other); |