Chris@37: /* Chris@37: jVamp Chris@37: Chris@37: A Java host interface for Vamp audio analysis plugins Chris@37: Chris@37: Centre for Digital Music, Queen Mary, University of London. Chris@37: Copyright 2012 Chris Cannam and QMUL. Chris@37: Chris@37: Permission is hereby granted, free of charge, to any person Chris@37: obtaining a copy of this software and associated documentation Chris@37: files (the "Software"), to deal in the Software without Chris@37: restriction, including without limitation the rights to use, copy, Chris@37: modify, merge, publish, distribute, sublicense, and/or sell copies Chris@37: of the Software, and to permit persons to whom the Software is Chris@37: furnished to do so, subject to the following conditions: Chris@37: Chris@37: The above copyright notice and this permission notice shall be Chris@37: included in all copies or substantial portions of the Software. Chris@37: Chris@37: THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, Chris@37: EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF Chris@37: MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND Chris@37: NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR Chris@37: ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF Chris@37: CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION Chris@37: WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Chris@37: Chris@37: Except as contained in this notice, the names of the Centre for Chris@37: Digital Music; Queen Mary, University of London; and Chris Cannam Chris@37: shall not be used in advertising or otherwise to promote the sale, Chris@37: use or other dealings in this Software without prior written Chris@37: authorization. Chris@37: */ Chris@7: Chris@55: #ifndef JVAMP_GETSET_H_INCLUDED Chris@55: #define JVAMP_GETSET_H_INCLUDED Chris@7: Chris@7: #include Chris@7: Chris@7: #include Chris@7: #include Chris@7: Chris@14: #include Chris@14: Chris@10: extern int Chris@10: getIntField(JNIEnv *env, jobject obj, std::string name); Chris@10: Chris@49: extern Vamp::RealTime Chris@49: getRealTime(JNIEnv *env, jobject obj); // where obj is a RealTime object Chris@49: Chris@7: extern void Chris@7: setStringField(JNIEnv *env, jobject obj, std::string name, std::string value); Chris@7: Chris@7: extern void Chris@7: setFloatField(JNIEnv *env, jobject obj, std::string name, float value); Chris@7: Chris@7: extern void Chris@7: setBooleanField(JNIEnv *env, jobject obj, std::string name, bool value); Chris@7: Chris@7: extern void Chris@7: setIntField(JNIEnv *env, jobject obj, std::string name, int value); Chris@7: Chris@7: extern void Chris@14: setRealTimeField(JNIEnv *env, jobject obj, std::string name, Vamp::RealTime value); Chris@14: Chris@14: extern void Chris@7: setObjectField(JNIEnv *env, jobject obj, std::string name, std::string type, jobject value); Chris@7: Chris@7: extern void Chris@14: setFloatArrayField(JNIEnv *env, jobject obj, std::string name, std::vector value); Chris@14: Chris@14: extern void Chris@7: setStringArrayField(JNIEnv *env, jobject obj, std::string name, std::vector value); Chris@7: Chris@7: extern jmethodID Chris@7: getEnumValueOfMethod(JNIEnv *env); Chris@7: Chris@7: #endif