Changed data transaction objects to use pointers

This commit is contained in:
Charles J. Cliffe
2014-12-22 19:43:56 -05:00
parent 24c86bc9e4
commit 312b25f55a
11 changed files with 125 additions and 56 deletions
+6 -4
View File
@@ -157,8 +157,8 @@ void DemodulatorPreThread::threadMain() {
continue;
}
std::vector<signed char> *data = &inp.data;
if (data->size()) {
std::vector<signed char> *data = inp.data;
if (data && data->size()) {
int bufSize = data->size() / 2;
liquid_float_complex in_buf_data[bufSize];
@@ -185,9 +185,10 @@ void DemodulatorPreThread::threadMain() {
}
DemodulatorThreadPostIQData resamp;
resamp.data.resize(bufSize);
resamp.data = new std::vector<liquid_float_complex>;
resamp.data->resize(bufSize);
firfilt_crcf_execute_block(fir_filter, in_buf, bufSize, &resamp.data[0]);
firfilt_crcf_execute_block(fir_filter, in_buf, bufSize, &((*resamp.data)[0]));
resamp.audio_resample_ratio = audio_resample_ratio;
resamp.audio_resampler = audio_resampler;
@@ -195,6 +196,7 @@ void DemodulatorPreThread::threadMain() {
resamp.resampler = resampler;
postInputQueue->push(resamp);
inp.cleanup();
}
if (!workerResults->empty()) {