mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2026-06-07 16:34:50 -04:00
ReBuffer is overkill for scope vis and crashes OSX; just push and delete at reciever; clean up lazy exception-fallback loadSession code
This commit is contained in:
@@ -23,7 +23,6 @@ DemodulatorThread::DemodulatorThread(DemodulatorInstance *parent)
|
||||
}
|
||||
|
||||
DemodulatorThread::~DemodulatorThread() {
|
||||
|
||||
}
|
||||
|
||||
void DemodulatorThread::onBindOutput(std::string name, ThreadQueueBase *threadQueue) {
|
||||
@@ -65,8 +64,6 @@ void DemodulatorThread::run() {
|
||||
pthread_setschedparam(tID, SCHED_FIFO, &prio);
|
||||
#endif
|
||||
|
||||
ReBuffer<AudioThreadInput> audioVisBuffers("DemodulatorThreadAudioBuffers");
|
||||
|
||||
std::cout << "Demodulator thread started.." << std::endl;
|
||||
|
||||
iqInputQueue = static_cast<DemodulatorThreadPostInputQueue*>(getInputQueue("IQDataInput"));
|
||||
@@ -188,7 +185,7 @@ void DemodulatorThread::run() {
|
||||
}
|
||||
|
||||
if (ati && localAudioVisOutputQueue != nullptr && localAudioVisOutputQueue->empty()) {
|
||||
AudioThreadInput *ati_vis = audioVisBuffers.getBuffer();
|
||||
AudioThreadInput *ati_vis = new AudioThreadInput;
|
||||
|
||||
ati_vis->setRefCount(1);
|
||||
ati_vis->sampleRate = inp->sampleRate;
|
||||
@@ -284,11 +281,10 @@ void DemodulatorThread::run() {
|
||||
//Guard the cleanup of audioVisOutputQueue properly.
|
||||
std::lock_guard < std::mutex > lock(m_mutexAudioVisOutputQueue);
|
||||
|
||||
if (audioVisOutputQueue != nullptr && !audioVisOutputQueue->empty()) {
|
||||
AudioThreadInput *dummy_vis;
|
||||
audioVisOutputQueue->pop(dummy_vis);
|
||||
}
|
||||
audioVisBuffers.purge();
|
||||
// if (audioVisOutputQueue != nullptr && !audioVisOutputQueue->empty()) {
|
||||
// AudioThreadInput *dummy_vis;
|
||||
// audioVisOutputQueue->pop(dummy_vis);
|
||||
// }
|
||||
|
||||
DemodulatorThreadCommand tCmd(DemodulatorThreadCommand::DEMOD_THREAD_CMD_DEMOD_TERMINATED);
|
||||
tCmd.context = this;
|
||||
|
||||
Reference in New Issue
Block a user