Commit 9dd24f03 authored by Chris Chafe's avatar Chris Chafe
Browse files

add mutex to JMess class

parent 7f859966
......@@ -35,6 +35,8 @@
#include "jacktrip_globals.h"
#include <QDebug>
// sJackMutex definition
QMutex JMess::sJMessMutex;
//-------------------------------------------------------------------------------
/*! \brief Constructs a JMess object that has a jack client.
......@@ -169,8 +171,8 @@ void JMess::setConnectedPorts()
void JMess::connectSpawnedPorts(int nChans, int hubPatch)
// called from UdpMasterListener::connectMesh
{
static QMutex mutex;
QMutexLocker locker(&mutex);
QMutexLocker locker(&sJMessMutex);
QString IPS[gMAX_WAIRS];
int ctr = 0;
......
......@@ -44,6 +44,7 @@
//#include <QXmlSimpleReader>
//#include <QXmlInputSource>
//#include <QXmlContentHandler>
#include <QMutexLocker>
#include <jack/jack.h>
......@@ -87,5 +88,6 @@ private:
//OuputPortN InputPortN
QVector<QVector<QString> > mConnectedPorts;
QVector<QVector<QString> > mPortsToConnect;
static QMutex sJMessMutex; ///< Mutex to make thread safe jack functions that are not
};
#endif
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment