commit 47cedb3ae83d1bfc3ae3725a1056a3241286f8f9
parent e8d9867f1946a1b403172e6cf657c0a728543b25
Author: fundamental <mark.d.mccurry@gmail.com>
Date: Wed, 21 Nov 2012 11:12:23 -0500
DSSI: Fixes missing symbols
- Nio system is now completely removed when compiling for DSSI
- Stubs for called functions are added to the dssi driver
Diffstat:
5 files changed, 48 insertions(+), 10 deletions(-)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
@@ -343,8 +343,6 @@ if (DssiEnable)
target_link_libraries(zynaddsubfx_dssi
zynaddsubfx_core
- ${NIO_LIBRARIES}
- ${AUDIO_LIBRARIES}
${OS_LIBRARIES}
)
if (${CMAKE_SIZEOF_VOID_P} EQUAL "8")
diff --git a/src/Misc/Recorder.cpp b/src/Misc/Recorder.cpp
@@ -23,8 +23,7 @@
#include <sys/stat.h>
#include "Recorder.h"
#include "WavFile.h"
-#include "../Nio/OutMgr.h"
-#include "../Nio/WavEngine.h"
+#include "../Nio/Nio.h"
Recorder::Recorder()
:status(0), notetrigger(0)
@@ -46,8 +45,7 @@ int Recorder::preparefile(std::string filename_, int overwrite)
return 1;
}
- OutMgr::getInstance(). wave->newFile(new WavFile(filename_,
- synth->samplerate, 2));
+ Nio::waveNew(new WavFile(filename_, synth->samplerate, 2));
status = 1; //ready
@@ -62,15 +60,15 @@ void Recorder::start()
void Recorder::stop()
{
- OutMgr::getInstance(). wave->Stop();
- OutMgr::getInstance(). wave->destroyFile();
+ Nio::waveStop();
+ Nio::waveStart();
status = 0;
}
void Recorder::pause()
{
status = 0;
- OutMgr::getInstance(). wave->Stop();
+ Nio::waveStop();
}
int Recorder::recording()
@@ -85,7 +83,7 @@ void Recorder::triggernow()
{
if(status == 2) {
if(notetrigger != 1)
- OutMgr::getInstance().wave->Start();
+ Nio::waveStart();
notetrigger = 1;
}
}
diff --git a/src/Nio/Nio.cpp b/src/Nio/Nio.cpp
@@ -4,6 +4,7 @@
#include "EngineMgr.h"
#include "MidiIn.h"
#include "AudioOut.h"
+#include "WavEngine.h"
#include <iostream>
#include <algorithm>
using std::string;
@@ -115,3 +116,23 @@ void Nio::preferedSampleRate(unsigned &rate)
void Nio::preferedSampleRate(unsigned &)
{}
#endif
+
+void Nio::waveNew(class WavFile *wave)
+{
+ out->wave->newFile(wave);
+}
+
+void Nio::waveStart(void)
+{
+ out->wave->Start();
+}
+
+void Nio::waveStop(void)
+{
+ out->wave->Stop();
+}
+
+void Nio::waveEnd(void)
+{
+ out->wave->destroyFile();
+}
diff --git a/src/Nio/Nio.h b/src/Nio/Nio.h
@@ -3,6 +3,8 @@
#include <string>
#include <set>
+class WavFile;
+
/**Interface to Nio Subsystem
*
* Should be only externally included header */
@@ -30,6 +32,13 @@ namespace Nio
//Get the prefered sample rate from jack (if running)
void preferedSampleRate(unsigned &rate);
+
+ //Wave writing
+ void waveNew(class WavFile *wave);
+ void waveStart(void);
+ void waveStop(void);
+ void waveEnd(void);
+
extern bool autoConnect;
extern std::string defaultSource;
extern std::string defaultSink;
diff --git a/src/Output/DSSIaudiooutput.cpp b/src/Output/DSSIaudiooutput.cpp
@@ -37,6 +37,18 @@
using std::string;
using std::vector;
+//Dummy variables and functions for linking purposes
+const char *instance_name = 0;
+class WavFile;
+namespace Nio {
+ bool start(void){return 1;};
+ void stop(void){};
+ void waveNew(WavFile *){}
+ void waveStart(void){}
+ void waveStop(void){}
+ void waveEnd(void){}
+}
+
//
// Static stubs for LADSPA member functions
//