kopia lustrzana https://github.com/f4exb/sdrangel
FCD: fixed core dump on stop (misplacement of FCD audio close)
rodzic
2529af3baa
commit
d9d4baa541
|
@ -90,6 +90,16 @@ bool FCDProInput::openDevice()
|
||||||
return false;
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -123,16 +133,6 @@ bool FCDProInput::start()
|
||||||
return false;
|
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 = new FCDProThread(&m_sampleFifo, &m_fcdFIFO);
|
||||||
m_FCDThread->startWork();
|
m_FCDThread->startWork();
|
||||||
|
|
||||||
|
@ -153,6 +153,8 @@ void FCDProInput::closeDevice()
|
||||||
|
|
||||||
fcdClose(m_dev);
|
fcdClose(m_dev);
|
||||||
m_dev = 0;
|
m_dev = 0;
|
||||||
|
|
||||||
|
closeFCDAudio();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool FCDProInput::openFCDAudio(const char* cardname)
|
bool FCDProInput::openFCDAudio(const char* cardname)
|
||||||
|
@ -194,7 +196,6 @@ void FCDProInput::stop()
|
||||||
// wait for thread to quit ?
|
// wait for thread to quit ?
|
||||||
delete m_FCDThread;
|
delete m_FCDThread;
|
||||||
m_FCDThread = nullptr;
|
m_FCDThread = nullptr;
|
||||||
closeFCDAudio();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
m_running = false;
|
m_running = false;
|
||||||
|
|
|
@ -90,6 +90,16 @@ bool FCDProPlusInput::openDevice()
|
||||||
return false;
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -125,16 +135,6 @@ bool FCDProPlusInput::start()
|
||||||
return false;
|
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 = new FCDProPlusThread(&m_sampleFifo, &m_fcdFIFO);
|
||||||
m_FCDThread->startWork();
|
m_FCDThread->startWork();
|
||||||
|
|
||||||
|
@ -155,6 +155,8 @@ void FCDProPlusInput::closeDevice()
|
||||||
|
|
||||||
fcdClose(m_dev);
|
fcdClose(m_dev);
|
||||||
m_dev = 0;
|
m_dev = 0;
|
||||||
|
|
||||||
|
closeFCDAudio();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool FCDProPlusInput::openFCDAudio(const char* cardname)
|
bool FCDProPlusInput::openFCDAudio(const char* cardname)
|
||||||
|
@ -196,7 +198,6 @@ void FCDProPlusInput::stop()
|
||||||
// wait for thread to quit ?
|
// wait for thread to quit ?
|
||||||
delete m_FCDThread;
|
delete m_FCDThread;
|
||||||
m_FCDThread = nullptr;
|
m_FCDThread = nullptr;
|
||||||
closeFCDAudio();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
m_running = false;
|
m_running = false;
|
||||||
|
|
Ładowanie…
Reference in New Issue