TH_CLEAN_3: Use of non-blocking try_pop() when possible,

AudioThread concurrent access hardening and simplified,
and misc.
This commit is contained in:
vsonnier
2016-07-05 21:43:45 +02:00
parent 3bf17d0f40
commit b495b388c9
16 changed files with 223 additions and 149 deletions
+1
View File
@@ -17,6 +17,7 @@ unsigned int FFTDataDistributor::getLinesPerSecond() {
}
void FFTDataDistributor::process() {
while (!input->empty()) {
if (!isAnyOutputEmpty()) {
return;
+5 -5
View File
@@ -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()
}