mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2024-11-22 19:58:39 -05:00
OSX crash-on-exit fix
This commit is contained in:
parent
f1355b1775
commit
234f0783a0
@ -74,10 +74,6 @@ int CubicSDR::OnExit() {
|
||||
|
||||
demodMgr.terminateAll();
|
||||
|
||||
#ifdef __APPLE__
|
||||
AudioThread::deviceCleanup();
|
||||
#endif
|
||||
|
||||
delete threadCmdQueueSDR;
|
||||
|
||||
delete iqVisualQueue;
|
||||
@ -86,6 +82,11 @@ int CubicSDR::OnExit() {
|
||||
|
||||
delete m_glContext;
|
||||
|
||||
|
||||
#ifdef __APPLE__
|
||||
AudioThread::deviceCleanup();
|
||||
#endif
|
||||
|
||||
return wxApp::OnExit();
|
||||
}
|
||||
|
||||
|
@ -51,6 +51,11 @@ static int audioCallback(void *outputBuffer, void *inputBuffer, unsigned int nBu
|
||||
AudioThread *src = (AudioThread *) userData;
|
||||
float *out = (float*) outputBuffer;
|
||||
memset(out, 0, nBufferFrames * 2 * sizeof(float));
|
||||
|
||||
if (src->terminated) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (status) {
|
||||
std::cout << "Audio buffer underflow.." << (src->underflowCount++) << std::endl;
|
||||
}
|
||||
@ -383,8 +388,10 @@ void AudioThread::threadMain() {
|
||||
}
|
||||
}
|
||||
|
||||
#if !__APPLE__
|
||||
AudioThreadInput dummy;
|
||||
inputQueue->push(&dummy);
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
if (deviceController[parameters.deviceId] != this) {
|
||||
|
Loading…
Reference in New Issue
Block a user