summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/PhaseReference.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/PhaseReference.cpp b/src/PhaseReference.cpp
index 4e4e51a..d9d9efc 100644
--- a/src/PhaseReference.cpp
+++ b/src/PhaseReference.cpp
@@ -71,7 +71,7 @@ PhaseReference::PhaseReference(unsigned int dabmode) :
throw std::runtime_error(
"PhaseReference::PhaseReference DAB mode not valid!");
}
- d_dataIn.resize(d_num);
+ d_dataIn.resize(d_carriers);
fillData();
myOutputFormat.size(d_carriers * sizeof(complexf));
@@ -141,7 +141,12 @@ void PhaseReference::fillData()
"PhaseReference::fillData invalid DAB mode!");
}
- for (index = 0, offset = 0; index < d_carriers; ++offset) {
+ if (d_dataIn.size() != d_carriers) {
+ throw std::runtime_error(
+ "PhaseReference::fillData d_dataIn has incorrect size!");
+ }
+
+ for (index = 0, offset = 0; index < d_dataIn.size(); ++offset) {
for (k = 0; k < 32; ++k) {
d_dataIn[index++] = convert(d_h[table[d_dabmode][offset][0]][k]
+ table[d_dabmode][offset][1]);