/* * Copyright (c) 2012 Peter Brinkmann (peter.brinkmann@gmail.com) * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. */ #include "z_jni_shared.c" JNIEXPORT jstring JNICALL Java_org_puredata_core_PdBase_audioImplementation (JNIEnv *env , jclass cls) { return NULL; } JNIEXPORT jboolean JNICALL Java_org_puredata_core_PdBase_implementsAudio (JNIEnv *env, jclass cls) { return 0; } JNIEXPORT jint JNICALL Java_org_puredata_core_PdBase_openAudio (JNIEnv *env, jclass cls, jint inChans, jint outChans, jint sRate, jobject options) { pthread_mutex_lock(&mutex); jint err = libpd_init_audio(inChans, outChans, sRate); pthread_mutex_unlock(&mutex); return err; } JNIEXPORT void JNICALL Java_org_puredata_core_PdBase_closeAudio (JNIEnv *env, jclass cls) { // do nothing } JNIEXPORT jint JNICALL Java_org_puredata_core_PdBase_startAudio (JNIEnv *env, jclass cls) { return -1; } JNIEXPORT jint JNICALL Java_org_puredata_core_PdBase_pauseAudio (JNIEnv *env, jclass cls) { return -1; } JNIEXPORT jboolean JNICALL Java_org_puredata_core_PdBase_isRunning (JNIEnv *env, jclass cls) { return 0; } JNIEXPORT jint JNICALL Java_org_puredata_core_PdBase_suggestSampleRate (JNIEnv *env, jclass cls) { return -1; } JNIEXPORT jint JNICALL Java_org_puredata_core_PdBase_suggestInputChannels (JNIEnv *env, jclass cls) { return -1; } JNIEXPORT jint JNICALL Java_org_puredata_core_PdBase_suggestOutputChannels (JNIEnv *env, jclass cls) { return -1; }