summaryrefslogtreecommitdiffstats
path: root/dabplussnoop.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2016-03-07 22:45:02 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2016-03-07 22:45:02 +0100
commitf289793bf787c122962175fb9388421d19d7b360 (patch)
tree07bc34aef5e42fd6d1d82f33ec0ab43dd93a44fb /dabplussnoop.cpp
parent04865110b09fa39fa37805b05ce2ba9542f16f42 (diff)
downloadetisnoop-f289793bf787c122962175fb9388421d19d7b360.tar.gz
etisnoop-f289793bf787c122962175fb9388421d19d7b360.tar.bz2
etisnoop-f289793bf787c122962175fb9388421d19d7b360.zip
Fix whitespace
Diffstat (limited to 'dabplussnoop.cpp')
-rw-r--r--dabplussnoop.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/dabplussnoop.cpp b/dabplussnoop.cpp
index 5ee556e..13661ef 100644
--- a/dabplussnoop.cpp
+++ b/dabplussnoop.cpp
@@ -19,7 +19,7 @@
Authors:
Matthias P. Braendli <matthias@mpb.li>
- Mathias Coinchon <coinchon@yahoo.com>
+ Mathias Coinchon <coinchon@yahoo.com>
*/
#include <stdio.h>
@@ -56,22 +56,22 @@ void DabPlusSnoop::push(uint8_t* streamdata, size_t streamsize)
if (decode()) {
- // First dump to subchannel file (superframe+parity word)
- if (m_raw_data_stream_fd == NULL) {
- stringstream dump_filename;
- dump_filename << "stream-" << m_index << ".msc";
+ // First dump to subchannel file (superframe+parity word)
+ if (m_raw_data_stream_fd == NULL) {
+ stringstream dump_filename;
+ dump_filename << "stream-" << m_index << ".msc";
- m_raw_data_stream_fd = fopen(dump_filename.str().c_str(), "w");
+ m_raw_data_stream_fd = fopen(dump_filename.str().c_str(), "w");
- if (m_raw_data_stream_fd == NULL) {
- perror("File open failed");
- }
- }
-
- fwrite(&m_data[0], m_subchannel_index, 120, m_raw_data_stream_fd);
+ if (m_raw_data_stream_fd == NULL) {
+ perror("File open failed");
+ }
+ }
- // We have been able to decode the AUs, now flush vector
- m_data.clear();
+ fwrite(&m_data[0], m_subchannel_index, 120, m_raw_data_stream_fd);
+
+ // We have been able to decode the AUs, now flush vector
+ m_data.clear();
}
}
}
@@ -107,7 +107,7 @@ bool DabPlusSnoop::seek_valid_firecode()
#if DPS_DEBUG
printf(DPS_PREFIX " Found valid FireCode at %zu\n", i);
#endif
- //erase elements before the header
+ //erase elements before the header
m_data.erase(m_data.begin(), m_data.begin() + i);
return true;
}
@@ -291,8 +291,8 @@ bool DabPlusSnoop::extract_au(vector<int> au_start)
return analyse_au(aus);
}
else {
- //discard faulty superframe (to be improved to correct/conceal)
- m_data.clear();
+ //discard faulty superframe (to be improved to correct/conceal)
+ m_data.clear();
return false;
}
}