diff src/Plugin.cpp @ 49:2db3640905ef

Rewrite RealTime so as not to use a native object handle, removing onerous and unsatisfactory requirement to call dispose() on all RealTime objects or leak native heap
author Chris Cannam
date Wed, 02 Sep 2015 15:17:40 +0100
parents 91259f3449ae
children
line wrap: on
line diff
--- a/src/Plugin.cpp	Wed Mar 06 15:08:40 2013 +0000
+++ b/src/Plugin.cpp	Wed Sep 02 15:17:40 2015 +0100
@@ -372,7 +372,7 @@
 {
     Plugin *p = getHandle<Plugin>(env, obj);
 
-    const Vamp::RealTime *const rt = getHandle<Vamp::RealTime>(env, timestamp);
+    Vamp::RealTime rt = getRealTime(env, timestamp);
     
     int channels = env->GetArrayLength(data);
     float **arr = new float *[channels];
@@ -383,7 +383,7 @@
 	input[c] = arr[c] + offset;
     }
 
-    Plugin::FeatureSet features = p->process(input, *rt);
+    Plugin::FeatureSet features = p->process(input, rt);
 
     for (int c = 0; c < channels; ++c) {
         jfloatArray cdata = (jfloatArray)env->GetObjectArrayElement(data, c);