00001 /* 00002 * Portable Audio I/O Library 00003 * Java Binding for PortAudio 00004 * 00005 * Based on the Open Source API proposed by Ross Bencina 00006 * Copyright (c) 2008 Ross Bencina 00007 * 00008 * Permission is hereby granted, free of charge, to any person obtaining 00009 * a copy of this software and associated documentation files 00010 * (the "Software"), to deal in the Software without restriction, 00011 * including without limitation the rights to use, copy, modify, merge, 00012 * publish, distribute, sublicense, and/or sell copies of the Software, 00013 * and to permit persons to whom the Software is furnished to do so, 00014 * subject to the following conditions: 00015 * 00016 * The above copyright notice and this permission notice shall be 00017 * included in all copies or substantial portions of the Software. 00018 * 00019 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 00020 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00021 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 00022 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 00023 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 00024 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 00025 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 00026 */ 00027 00028 /* 00029 * The text above constitutes the entire PortAudio license; however, 00030 * the PortAudio community also makes the following non-binding requests: 00031 * 00032 * Any person wishing to distribute modifications to the Software is 00033 * requested to send the modifications to the original developer so that 00034 * they can be incorporated into the canonical version. It is also 00035 * requested that these non-binding requests be included along with the 00036 * license above. 00037 */ 00038 00039 #include "com_portaudio_PortAudio.h" 00040 #include "portaudio.h" 00041 00042 #ifndef JPA_TOOLS_H 00043 #define JPA_TOOLS_H 00044 00045 jint jpa_GetIntField( JNIEnv *env, jclass cls, jobject obj, const char *fieldName ); 00046 void jpa_SetIntField( JNIEnv *env, jclass cls, jobject obj, const char *fieldName, jint value ); 00047 00048 jlong jpa_GetLongField( JNIEnv *env, jclass cls, jobject obj, const char *fieldName ); 00049 void jpa_SetLongField( JNIEnv *env, jclass cls, jobject obj, const char *fieldName, jlong value ); 00050 00051 jdouble jpa_GetDoubleField( JNIEnv *env, jclass cls, jobject obj, const char *fieldName ); 00052 void jpa_SetDoubleField( JNIEnv *env, jclass cls, jobject obj, const char *fieldName, jdouble value ); 00053 00054 void jpa_SetStringField( JNIEnv *env, jclass cls, jobject obj, const char *fieldName, const char *value ); 00055 PaStreamParameters *jpa_FillStreamParameters( JNIEnv *env, jobject jstreamParam, PaStreamParameters *myParams ); 00056 00057 jint jpa_CheckError( JNIEnv *env, PaError err ); 00058 jint jpa_ThrowError( JNIEnv *env, const char *message ); 00059 00060 PaStream *jpa_GetStreamPointer( JNIEnv *env, jobject blockingStream ); 00061 00062 #endif /* JPA_TOOLS_H */