Commit bb7a895f authored by jcacerec's avatar jcacerec
Browse files

added RT AUDIO flag to compile without it

parent eac337c2
......@@ -40,7 +40,9 @@
#include "RingBufferWavetable.h"
#include "jacktrip_globals.h"
#include "JackAudioInterface.h"
#ifdef __RT_AUDIO__
#include "RtAudioInterface.h"
#endif
#include <iostream>
//#include <unistd.h> // for usleep, sleep
......@@ -139,18 +141,22 @@ void JackTrip::setupAudio()
mAudioInterface->setClientName(mJackClientName);
#endif //__NON_JACK__
#ifdef __NO_JACK__ /// \todo FIX THIS REPETITION OF CODE
#ifdef __RT_AUDIO__
cout << "Warning: using non jack version, RtAudio will be used instead" << endl;
mAudioInterface = new RtAudioInterface(this, mNumChans, mNumChans, mAudioBitResolution);
mAudioInterface->setSampleRate(mSampleRate);
mAudioInterface->setBufferSizeInSamples(mAudioBufferSize);
mAudioInterface->setup();
#endif
#endif
}
else if ( mAudiointerfaceMode == JackTrip::RTAUDIO ) {
#ifdef __RT_AUDIO__
mAudioInterface = new RtAudioInterface(this, mNumChans, mNumChans, mAudioBitResolution);
mAudioInterface->setSampleRate(mSampleRate);
mAudioInterface->setBufferSizeInSamples(mAudioBufferSize);
mAudioInterface->setup();
#endif
}
std::cout << "The Sampling Rate is: " << mSampleRate << std::endl;
......
......@@ -391,9 +391,11 @@ void Settings::startJackTrip()
}
// Set RtAudio
#ifdef __RT_AUDIO__
if (!mUseJack) {
mJackTrip->setAudiointerfaceMode(JackTrip::RTAUDIO);
}
#endif
// Chanfe default Sampling Rate
if (mChanfeDefaultSR) {
......
......@@ -11,6 +11,7 @@ CONFIG(debug, debug|release) {
QT -= gui
QT += network
# http://wiki.qtcentre.org/index.php?title=Undocumented_qmake#Custom_tools
DEFINES += __RT_AUDIO__
# Configuration without Jack
nojack {
DEFINES += __NO_JACK__
......
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