mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-05 08:21:16 -05:00
FCD: fixed core dump on stop (misplacement of FCD audio close)
This commit is contained in:
parent
2529af3baa
commit
d9d4baa541
@ -90,6 +90,16 @@ bool FCDProInput::openDevice()
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!openFCDAudio(fcd_traits<Pro>::qtDeviceName))
|
||||
{
|
||||
qCritical("FCDProInput::start: could not open FCD audio source");
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
qDebug("FCDProInput::start: FCD audio source opened");
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -123,16 +133,6 @@ bool FCDProInput::start()
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!openFCDAudio(fcd_traits<Pro>::qtDeviceName))
|
||||
{
|
||||
qCritical("FCDProInput::start: could not open FCD audio source");
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
qDebug("FCDProInput::start: FCD audio source opened");
|
||||
}
|
||||
|
||||
m_FCDThread = new FCDProThread(&m_sampleFifo, &m_fcdFIFO);
|
||||
m_FCDThread->startWork();
|
||||
|
||||
@ -153,6 +153,8 @@ void FCDProInput::closeDevice()
|
||||
|
||||
fcdClose(m_dev);
|
||||
m_dev = 0;
|
||||
|
||||
closeFCDAudio();
|
||||
}
|
||||
|
||||
bool FCDProInput::openFCDAudio(const char* cardname)
|
||||
@ -194,7 +196,6 @@ void FCDProInput::stop()
|
||||
// wait for thread to quit ?
|
||||
delete m_FCDThread;
|
||||
m_FCDThread = nullptr;
|
||||
closeFCDAudio();
|
||||
}
|
||||
|
||||
m_running = false;
|
||||
|
@ -90,6 +90,16 @@ bool FCDProPlusInput::openDevice()
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!openFCDAudio(fcd_traits<ProPlus>::qtDeviceName))
|
||||
{
|
||||
qCritical("FCDProPlusInput::start: could not open FCD audio source");
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
qDebug("FCDProPlusInput::start: FCD audio source opened");
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -125,16 +135,6 @@ bool FCDProPlusInput::start()
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!openFCDAudio(fcd_traits<ProPlus>::qtDeviceName))
|
||||
{
|
||||
qCritical("FCDProPlusInput::start: could not open FCD audio source");
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
qDebug("FCDProPlusInput::start: FCD audio source opened");
|
||||
}
|
||||
|
||||
m_FCDThread = new FCDProPlusThread(&m_sampleFifo, &m_fcdFIFO);
|
||||
m_FCDThread->startWork();
|
||||
|
||||
@ -155,6 +155,8 @@ void FCDProPlusInput::closeDevice()
|
||||
|
||||
fcdClose(m_dev);
|
||||
m_dev = 0;
|
||||
|
||||
closeFCDAudio();
|
||||
}
|
||||
|
||||
bool FCDProPlusInput::openFCDAudio(const char* cardname)
|
||||
@ -196,7 +198,6 @@ void FCDProPlusInput::stop()
|
||||
// wait for thread to quit ?
|
||||
delete m_FCDThread;
|
||||
m_FCDThread = nullptr;
|
||||
closeFCDAudio();
|
||||
}
|
||||
|
||||
m_running = false;
|
||||
|
Loading…
Reference in New Issue
Block a user