mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2024-11-26 05:38:39 -05:00
On second thought, let’s not go to Camelot. ‘Tis a silly place.
This commit is contained in:
parent
0067e309d1
commit
d7ef86ae10
@ -84,16 +84,11 @@ static int audioCallback(void *outputBuffer, void * /* inputBuffer */, unsigned
|
||||
}
|
||||
srcmix->inputQueue->pop(srcmix->currentInput);
|
||||
if (srcmix->isTerminated()) {
|
||||
if (srcmix->currentInput) {
|
||||
srcmix->currentInput->decRefCount();
|
||||
}
|
||||
continue;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
// std::lock_guard < std::mutex > lock(srcmix->currentInput->m_mutex);
|
||||
|
||||
if (srcmix->currentInput->sampleRate != src->getSampleRate()) {
|
||||
while (srcmix->inputQueue->size()) {
|
||||
srcmix->inputQueue->pop(srcmix->currentInput);
|
||||
@ -126,9 +121,6 @@ static int audioCallback(void *outputBuffer, void * /* inputBuffer */, unsigned
|
||||
}
|
||||
srcmix->inputQueue->pop(srcmix->currentInput);
|
||||
if (srcmix->isTerminated()) {
|
||||
if (srcmix->currentInput) {
|
||||
srcmix->currentInput->decRefCount();
|
||||
}
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@ -150,9 +142,6 @@ static int audioCallback(void *outputBuffer, void * /* inputBuffer */, unsigned
|
||||
}
|
||||
srcmix->inputQueue->pop(srcmix->currentInput);
|
||||
if (srcmix->isTerminated()) {
|
||||
if (srcmix->currentInput) {
|
||||
srcmix->currentInput->decRefCount();
|
||||
}
|
||||
break;
|
||||
}
|
||||
float srcPeak = srcmix->currentInput->peak * srcmix->gain;
|
||||
@ -180,9 +169,6 @@ static int audioCallback(void *outputBuffer, void * /* inputBuffer */, unsigned
|
||||
}
|
||||
srcmix->inputQueue->pop(srcmix->currentInput);
|
||||
if (srcmix->isTerminated()) {
|
||||
if (srcmix->currentInput) {
|
||||
srcmix->currentInput->decRefCount();
|
||||
}
|
||||
break;
|
||||
}
|
||||
float srcPeak = srcmix->currentInput->peak * srcmix->gain;
|
||||
@ -414,6 +400,11 @@ void AudioThread::run() {
|
||||
ref->decRefCount();
|
||||
}
|
||||
}
|
||||
|
||||
if (currentInput) {
|
||||
currentInput->setRefCount(0);
|
||||
currentInput = nullptr;
|
||||
}
|
||||
|
||||
if (deviceController[parameters.deviceId] != this) {
|
||||
deviceController[parameters.deviceId]->removeThread(this);
|
||||
|
Loading…
Reference in New Issue
Block a user