kopia lustrzana https://gitlab.com/eliggett/wfview
Re-order audio handler destructors
rodzic
bcc16b8d29
commit
ac2c104209
|
@ -18,23 +18,24 @@ audioHandler::audioHandler(QObject* parent) : QObject(parent)
|
|||
audioHandler::~audioHandler()
|
||||
{
|
||||
|
||||
if (converterThread != Q_NULLPTR) {
|
||||
converterThread->quit();
|
||||
converterThread->wait();
|
||||
}
|
||||
|
||||
if (isInitialized) {
|
||||
stop();
|
||||
}
|
||||
|
||||
if (audioInput != Q_NULLPTR) {
|
||||
audioInput = Q_NULLPTR;
|
||||
delete audioInput;
|
||||
audioInput = Q_NULLPTR;
|
||||
}
|
||||
if (audioOutput != Q_NULLPTR) {
|
||||
delete audioOutput;
|
||||
audioOutput = Q_NULLPTR;
|
||||
}
|
||||
|
||||
if (converterThread != Q_NULLPTR) {
|
||||
converterThread->quit();
|
||||
converterThread->wait();
|
||||
}
|
||||
}bool audioHandler::init(audioSetup setup)
|
||||
{
|
||||
if (isInitialized) {
|
||||
|
|
|
@ -15,17 +15,15 @@ paHandler::paHandler(QObject* parent)
|
|||
paHandler::~paHandler()
|
||||
{
|
||||
|
||||
if (isInitialized) {
|
||||
Pa_StopStream(audio);
|
||||
Pa_CloseStream(audio);
|
||||
}
|
||||
|
||||
if (converterThread != Q_NULLPTR) {
|
||||
converterThread->quit();
|
||||
converterThread->wait();
|
||||
}
|
||||
|
||||
//Pa_Terminate();
|
||||
if (isInitialized) {
|
||||
Pa_StopStream(audio);
|
||||
Pa_CloseStream(audio);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,13 @@ rtHandler::rtHandler(QObject* parent)
|
|||
rtHandler::~rtHandler()
|
||||
{
|
||||
|
||||
if (converterThread != Q_NULLPTR) {
|
||||
converterThread->quit();
|
||||
converterThread->wait();
|
||||
}
|
||||
|
||||
if (isInitialized) {
|
||||
|
||||
#ifdef RT_EXCEPTION
|
||||
try {
|
||||
#endif
|
||||
|
@ -31,11 +37,6 @@ rtHandler::~rtHandler()
|
|||
delete audio;
|
||||
|
||||
}
|
||||
|
||||
if (converterThread != Q_NULLPTR) {
|
||||
converterThread->quit();
|
||||
converterThread->wait();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue