mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2026-06-02 14:04:47 -04:00
TH_CLEAN_3: Use of non-blocking try_pop() when possible,
AudioThread concurrent access hardening and simplified, and misc.
This commit is contained in:
@@ -17,6 +17,7 @@ unsigned int FFTDataDistributor::getLinesPerSecond() {
|
||||
}
|
||||
|
||||
void FFTDataDistributor::process() {
|
||||
|
||||
while (!input->empty()) {
|
||||
if (!isAnyOutputEmpty()) {
|
||||
return;
|
||||
|
||||
@@ -68,10 +68,10 @@ void ScopeVisualProcessor::process() {
|
||||
if (!isOutputEmpty()) {
|
||||
return;
|
||||
}
|
||||
if (!input->empty()) {
|
||||
AudioThreadInput *audioInputData;
|
||||
input->pop(audioInputData);
|
||||
|
||||
AudioThreadInput *audioInputData;
|
||||
|
||||
if (input->try_pop(audioInputData)) {
|
||||
|
||||
if (!audioInputData) {
|
||||
return;
|
||||
}
|
||||
@@ -271,5 +271,5 @@ void ScopeVisualProcessor::process() {
|
||||
} else {
|
||||
delete audioInputData; //->decRefCount();
|
||||
}
|
||||
}
|
||||
} //end if try_pop()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user