diff --git a/src/audiomotor.cpp b/src/audiomotor.cpp index 3afc48d..558e6f4 100644 --- a/src/audiomotor.cpp +++ b/src/audiomotor.cpp @@ -18,12 +18,13 @@ AudioMotor *AudioMotor::getInstance() { AudioMotor::AudioMotor(QObject *parent) : QObject(parent), - m_startaudio(0), + m_gui(true), + m_layersNumber(0), + m_pd_audio(NULL), m_writePD(NULL), m_readPD(NULL), - m_pd_audio(NULL), m_connectedSocket(NULL), - m_gui(true) + m_startaudio(0) { qsrand(qrand()); /* Sets the socket an connections for the comunication with PD @@ -92,15 +93,15 @@ bool AudioMotor::init() /** Close the engine */ -bool AudioMotor::close() +void AudioMotor::close() { // disconnect(m_pd_audio, SIGNAL(readyReadStandardError()), this, SLOT(stdout())); disconnect(m_pd_audio, SIGNAL(finished(int)), this, SLOT(restartAudio())); -// m_pd_audio->terminate(); + if (!m_pd_audio->waitForFinished(1000)) m_pd_audio->terminate(); -// delete m_pd_audio; -// m_pd_audio = NULL; + + if (m_writePD != NULL) { disconnect(m_writePD, SIGNAL(connected()),this, SLOT(newConexion())); @@ -126,13 +127,13 @@ bool AudioMotor::close() /** Set the numbers of layers */ void AudioMotor::setLayers (int layers){ - + Q_UNUSED(layers); } /** Get the number of layers */ int AudioMotor::getlayers(){ - + return m_layersNumber; } /** Load a file in memory @@ -209,7 +210,8 @@ bool AudioMotor::stop(int layer) */ void AudioMotor::setEntryPoint(int layer, int entry) { - + Q_UNUSED(layer); + Q_UNUSED(entry); } @@ -218,7 +220,8 @@ void AudioMotor::setEntryPoint(int layer, int entry) */ void AudioMotor::setExitPoint(int layer, int exit) { - + Q_UNUSED(layer); + Q_UNUSED(exit); } /** Set the volumen in one layer @@ -253,14 +256,14 @@ void AudioMotor::setLayerPan(int layer, float pan) * 0 will mute all the outputs */ void AudioMotor::setMasterVolume(int vol){ - + Q_UNUSED(vol); } /** Set pan master * Will pan the master output of sound */ void AudioMotor::setMasterPan(int pan){ - + Q_UNUSED(pan); } diff --git a/src/audiomotor.h b/src/audiomotor.h index 714ee31..c748b83 100644 --- a/src/audiomotor.h +++ b/src/audiomotor.h @@ -28,7 +28,7 @@ public: /** Close the engine */ - bool close(); + void close(); /** Set the numbers of layers */ diff --git a/src/libremediaserver-audio.pro b/src/libremediaserver-audio.pro index 27b5782..b7ae263 100755 --- a/src/libremediaserver-audio.pro +++ b/src/libremediaserver-audio.pro @@ -1,7 +1,7 @@ TEMPLATE = app TARGET = libremediaserver-audio QT += network script webkit -CONFIG += release +#CONFIG += release DESTDIR = ./debug HEADERS += libremediaserver-audio.h \ diff --git a/src/olathread.cpp b/src/olathread.cpp index 42cb448..7ac9682 100644 --- a/src/olathread.cpp +++ b/src/olathread.cpp @@ -4,6 +4,7 @@ olaThread::olaThread(QObject *parent) // : QObject(parent) { + Q_UNUSED(parent); m_universe = new QList(); m_counter = 0; gettimeofday(&m_last_data, NULL); @@ -84,7 +85,7 @@ void olaThread::NewDmx(const ola::client::DMXMetadata &data, { m_counter++; gettimeofday(&m_last_data, NULL); - int universe = data.universe; + uint universe = data.universe; for (int i = 0; i < m_layersNumber; i++) { // loop for reading the channels by layer. if((m_settings.at(i).universe == universe) && ( m_settings.at(i).address > -1 )) { // Compare if the layer is from this universe