Fixed sigsev on exit
On AudioMotor destructor
This commit is contained in:
parent
061f58aee4
commit
747f5d4af6
4 changed files with 30 additions and 29 deletions
|
|
@ -57,22 +57,6 @@ libreMediaServerAudio::libreMediaServerAudio(QStringList args, QWidget *parent)
|
|||
topWidget->setWidget(amw);
|
||||
addDockWidget(Qt::TopDockWidgetArea, topWidget);
|
||||
|
||||
// Parse the command line options
|
||||
if (args.contains("-gui"))
|
||||
{
|
||||
qDebug()<< "libremediaserver Constructor option GUI detected";
|
||||
AudioMotor::getInstance()->setGui(true);
|
||||
textEdit->append("Pure Data GUI's will be shown");
|
||||
} else { AudioMotor::getInstance()->setGui(false); }
|
||||
|
||||
connect(AudioMotor::getInstance(), SIGNAL(toTerminal(QString)),
|
||||
this, SLOT(toTerminal(QString)));
|
||||
|
||||
if (args.contains("-log"))
|
||||
{
|
||||
textEdit->append("Logging to file");
|
||||
}
|
||||
|
||||
// Conectamos los menus
|
||||
connect(ui.actionOpen_conf, SIGNAL(triggered()), this, SLOT(openFile()));
|
||||
connect(ui.actionSave_conf, SIGNAL(triggered()), this, SLOT(saveFile()));
|
||||
|
|
@ -96,11 +80,31 @@ libreMediaServerAudio::libreMediaServerAudio(QStringList args, QWidget *parent)
|
|||
ola, SLOT( setDMXConf(dmxSetting) ) );
|
||||
|
||||
// Lee la configuración por defecto
|
||||
while (!set->readDefaultFile()) {
|
||||
if (!set->readDefaultFile()) {
|
||||
// Dar la oportunidad de cargar otro fichero de configuración
|
||||
// Crear el fichero por defecto.
|
||||
}
|
||||
|
||||
// Parse the command line options
|
||||
if (args.contains("-gui"))
|
||||
{
|
||||
qDebug()<< "libremediaserver Constructor option GUI detected";
|
||||
AudioMotor::getInstance()->setGui(true);
|
||||
textEdit->append("Pure Data GUI's will be shown");
|
||||
} else { AudioMotor::getInstance()->setGui(false); }
|
||||
|
||||
connect(AudioMotor::getInstance(), SIGNAL(toTerminal(QString)),
|
||||
this, SLOT(toTerminal(QString)));
|
||||
|
||||
if (args.contains("-log"))
|
||||
{
|
||||
textEdit->append("Logging to file");
|
||||
}
|
||||
|
||||
// Iniciamos Pure Data
|
||||
connect(AudioMotor::getInstance(), SIGNAL(loadbang()),
|
||||
this, SLOT (loadbang()));
|
||||
|
||||
AudioMotor::getInstance()->init();
|
||||
|
||||
connect(AudioMotor::getInstance(), SIGNAL(mediaLoaded(int, QString, QString)),
|
||||
|
|
@ -109,9 +113,6 @@ libreMediaServerAudio::libreMediaServerAudio(QStringList args, QWidget *parent)
|
|||
connect(AudioMotor::getInstance(), SIGNAL(volChanged(int, int)),
|
||||
aw, SLOT(volChanged(int, int)));
|
||||
|
||||
connect(AudioMotor::getInstance(), SIGNAL(loadbang()),
|
||||
this, SLOT (loadbang()));
|
||||
|
||||
connect(ola, SIGNAL( dmxOutput(int, int, int) ),
|
||||
this, SLOT( dmxInput(int, int, int) ) );
|
||||
|
||||
|
|
@ -128,13 +129,13 @@ libreMediaServerAudio::libreMediaServerAudio(QStringList args, QWidget *parent)
|
|||
libreMediaServerAudio::~libreMediaServerAudio()
|
||||
{
|
||||
// save_finish();
|
||||
delete MediaLibrary::getInstance();
|
||||
// delete MediaLibrary::getInstance();
|
||||
ola->stop();
|
||||
AudioMotor::getInstance()->close();
|
||||
// qDebug() << "PD Audio restarts: " << m_startaudio;
|
||||
qDebug() << QDate::currentDate() << QTime::currentTime();
|
||||
qDebug() << "********************************************************************************";
|
||||
return;
|
||||
// return;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue