diff audioio/AudioGenerator.cpp @ 26:cc48a7189152

* Modify to use Vamp SDK for proper feature extraction plugins. Requires that the vamp-plugin-sdk directory tree be present below plugin/ (it's separate in Subversion).
author Chris Cannam
date Fri, 31 Mar 2006 15:56:35 +0000
parents cb23944ce9e2
children dd2084d32652
line wrap: on
line diff
--- a/audioio/AudioGenerator.cpp	Thu Mar 30 13:18:11 2006 +0000
+++ b/audioio/AudioGenerator.cpp	Fri Mar 31 15:56:35 2006 +0000
@@ -26,6 +26,7 @@
 #include "plugin/RealTimePluginFactory.h"
 #include "plugin/RealTimePluginInstance.h"
 #include "plugin/PluginIdentifier.h"
+#include "plugin/PluginXml.h"
 #include "plugin/api/alsa/seq_event.h"
 
 #include <iostream>
@@ -117,7 +118,7 @@
 
     RealTimePluginInstance *plugin = m_synthMap[model];
     if (plugin) {
-        plugin->setParametersFromXml(configurationXml);
+        PluginXml(plugin).setParametersFromXml(configurationXml);
     }
 }
 
@@ -178,7 +179,7 @@
 
     RealTimePluginInstance *plugin = loadPlugin(pluginId, "");
     if (configurationXml != "") {
-        plugin->setParametersFromXml(configurationXml);
+        PluginXml(plugin).setParametersFromXml(configurationXml);
     }
 
     if (parameters) {
@@ -453,7 +454,7 @@
 	    sodm->getPoints(reqStart + latency,
 			    reqStart + latency + m_pluginBlockSize);
 
-	RealTime blockTime = RealTime::frame2RealTime
+        Vamp::RealTime blockTime = Vamp::RealTime::frame2RealTime
 	    (startFrame + i * m_pluginBlockSize, m_sourceSampleRate);
 
 	for (SparseOneDimensionalModel::PointList::iterator pli =
@@ -469,7 +470,7 @@
 	    while (noteOffs.begin() != noteOffs.end() &&
 		   noteOffs.begin()->frame <= pliFrame) {
 
-		RealTime eventTime = RealTime::frame2RealTime
+                Vamp::RealTime eventTime = Vamp::RealTime::frame2RealTime
 		    (noteOffs.begin()->frame, m_sourceSampleRate);
 
 		offEv.data.note.note = noteOffs.begin()->pitch;
@@ -482,7 +483,7 @@
 		noteOffs.erase(noteOffs.begin());
 	    }
 
-	    RealTime eventTime = RealTime::frame2RealTime
+            Vamp::RealTime eventTime = Vamp::RealTime::frame2RealTime
 		(pliFrame, m_sourceSampleRate);
 	    
 	    plugin->sendEvent(eventTime, &onEv);
@@ -502,7 +503,7 @@
 	       noteOffs.begin()->frame <=
 	       startFrame + i * m_pluginBlockSize + m_pluginBlockSize) {
 
-	    RealTime eventTime = RealTime::frame2RealTime
+            Vamp::RealTime eventTime = Vamp::RealTime::frame2RealTime
 		(noteOffs.begin()->frame, m_sourceSampleRate);
 
 	    offEv.data.note.note = noteOffs.begin()->pitch;
@@ -597,7 +598,7 @@
 	    nm->getPoints(reqStart + latency,
 			    reqStart + latency + m_pluginBlockSize);
 
-	RealTime blockTime = RealTime::frame2RealTime
+        Vamp::RealTime blockTime = Vamp::RealTime::frame2RealTime
 	    (startFrame + i * m_pluginBlockSize, m_sourceSampleRate);
 
 	for (NoteModel::PointList::iterator pli =
@@ -613,7 +614,7 @@
 	    while (noteOffs.begin() != noteOffs.end() &&
 		   noteOffs.begin()->frame <= pliFrame) {
 
-		RealTime eventTime = RealTime::frame2RealTime
+                Vamp::RealTime eventTime = Vamp::RealTime::frame2RealTime
 		    (noteOffs.begin()->frame, m_sourceSampleRate);
 
 		offEv.data.note.note = noteOffs.begin()->pitch;
@@ -626,7 +627,7 @@
 		noteOffs.erase(noteOffs.begin());
 	    }
 
-	    RealTime eventTime = RealTime::frame2RealTime
+            Vamp::RealTime eventTime = Vamp::RealTime::frame2RealTime
 		(pliFrame, m_sourceSampleRate);
 	    
 	    onEv.data.note.note = lrintf(pli->value);
@@ -648,7 +649,7 @@
 	       noteOffs.begin()->frame <=
 	       startFrame + i * m_pluginBlockSize + m_pluginBlockSize) {
 
-	    RealTime eventTime = RealTime::frame2RealTime
+            Vamp::RealTime eventTime = Vamp::RealTime::frame2RealTime
 		(noteOffs.begin()->frame, m_sourceSampleRate);
 
 	    offEv.data.note.note = noteOffs.begin()->pitch;