annotate src/PluginLoader.cpp @ 18:530bf5009ee2
Pull out Feature to a separate file; JNI doesn't seem to be able to find its constructor otherwise. Also a couple of other fixes
author |
Chris Cannam |
date |
Tue, 07 Feb 2012 12:12:36 +0000 |
parents |
9c108ad04e9b |
children |
cc9c503535d1 |
rev |
line source |
Chris@0
|
1 #include "org_vamp_plugins_PluginLoader.h"
|
Chris@0
|
2
|
Chris@0
|
3 #include <vamp-hostsdk/PluginLoader.h>
|
Chris@0
|
4
|
Chris@0
|
5 #include "handle.h"
|
Chris@0
|
6
|
Chris@0
|
7 using Vamp::Plugin;
|
Chris@0
|
8 using Vamp::HostExt::PluginLoader;
|
Chris@0
|
9
|
Chris@0
|
10 void
|
Chris@0
|
11 Java_org_vamp_1plugins_PluginLoader_initialise(JNIEnv *env, jobject obj)
|
Chris@0
|
12 {
|
Chris@0
|
13 PluginLoader *inst = PluginLoader::getInstance();
|
Chris@0
|
14 setHandle(env, obj, inst);
|
Chris@0
|
15 }
|
Chris@0
|
16
|
Chris@0
|
17 jlong
|
Chris@0
|
18 Java_org_vamp_1plugins_PluginLoader_loadPluginNative(JNIEnv *env, jobject obj,
|
Chris@0
|
19 jstring key, jfloat rate)
|
Chris@0
|
20 {
|
Chris@0
|
21 PluginLoader *inst = getHandle<PluginLoader>(env, obj);
|
Chris@0
|
22 const char *kstr = env->GetStringUTFChars(key, 0);
|
Chris@17
|
23 Plugin *p = inst->loadPlugin(kstr, rate, PluginLoader::ADAPT_ALL); //!!! args!
|
Chris@0
|
24 env->ReleaseStringUTFChars(key, kstr);
|
Chris@0
|
25 return (jlong)p;
|
Chris@0
|
26 }
|
Chris@0
|
27
|
Chris@0
|
28
|
Chris@0
|
29
|