SDR thread reusable buffers implemented

This commit is contained in:
Charles J. Cliffe
2014-12-24 00:11:41 -05:00
parent b7375ce09f
commit 8c852ed491
6 changed files with 66 additions and 31 deletions
+2 -3
View File
@@ -58,6 +58,7 @@ void SDRPostThread::threadMain() {
SDRThreadIQData *data_in;
iqDataInQueue.load()->pop(data_in);
// std::lock_guard < std::mutex > lock(data_in->m_mutex);
if (data_in && data_in->data.size()) {
SDRThreadIQData *dataOut = new SDRThreadIQData;
@@ -176,9 +177,7 @@ void SDRPostThread::threadMain() {
}
delete dataOut;
}
if (data_in) {
delete data_in;
}
data_in->decRefCount();
}
while (!buffers.empty()) {