annotate src/portaudio_20161030_catalina_patch/bindings/java/jportaudio.dox @ 169:223a55898ab9 tip default

Add null config files
author Chris Cannam <cannam@all-day-breakfast.com>
date Mon, 02 Mar 2020 14:03:47 +0000
parents d43aab368df9
children
rev   line source
cannam@162 1 /**
cannam@162 2 @page java_binding JPortAudio Java Binding
cannam@162 3 @ingroup jportaudio
cannam@162 4
cannam@162 5 <i>Note: this page has not been reviewed, and may contain errors.</i>
cannam@162 6
cannam@162 7 @section java_draft DRAFT - IN PROGRESS
cannam@162 8
cannam@162 9 9/4/12 JPortAudio is very new and should be considered an "alpha" release.
cannam@162 10 The building of JPortAudio will eventually be integrated into the Makefile as an optional build.
cannam@162 11
cannam@162 12 Currently JPortAudio is only supported for Windows and Macintosh. Please contact us if you want to help with porting Linux.
cannam@162 13
cannam@162 14 For reference documentation of the JPortAudio API see: com.portaudio.PortAudio
cannam@162 15
cannam@162 16 For an example see: PlaySine.java
cannam@162 17
cannam@162 18 @section java_comp_windows Building JPortAudio on Windows
cannam@162 19
cannam@162 20 Build the Java code using the Eclipse project in "jportaudio". Export as "jportaudio.jar".
cannam@162 21
cannam@162 22 If you modify the JNI API then you will need to regenerate the JNI .h files using:
cannam@162 23
cannam@162 24 @code
cannam@162 25 cd bindings/java/scripts
cannam@162 26 make_header.bat
cannam@162 27 @endcode
cannam@162 28
cannam@162 29 Build the JNI DLL using the Visual Studio 2010 solution in "java/c/build/vs2010/PortAudioJNI".
cannam@162 30
cannam@162 31 @section java_use_windows Using JPortAudio on Windows
cannam@162 32
cannam@162 33 Put the "jportaudio.jar" in the classpath for your application.
cannam@162 34 Place the following libraries where they can be found, typically in the same folder as your application.
cannam@162 35
cannam@162 36 - portaudio_x86.dll
cannam@162 37 - portaudio_x64.dll
cannam@162 38 - jportaudio_x86.dll
cannam@162 39 - jportaudio_x64.dll
cannam@162 40
cannam@162 41 @section java_comp_max Building JPortAudio on Mac
cannam@162 42
cannam@162 43 These are notes from building JPortAudio on a Mac with 10.6.8 and XCode 4.
cannam@162 44
cannam@162 45 I created a target of type 'C' library.
cannam@162 46
cannam@162 47 I added the regular PortAudio frameworks plus the JavaVM framework.
cannam@162 48
cannam@162 49 I modified com_portaudio_PortAudio.h and com_portaudio_BlockingStream.h so that jni.h could found.
cannam@162 50
cannam@162 51 @code
cannam@162 52 #if defined(__APPLE__)
cannam@162 53 #include <JavaVM/jni.h>
cannam@162 54 #else
cannam@162 55 #include <jni.h>
cannam@162 56 #endif
cannam@162 57 @endcode
cannam@162 58
cannam@162 59 This is bad because those header files are autogenerated and will be overwritten.
cannam@162 60 We need a better solution for this.
cannam@162 61
cannam@162 62 I had trouble finding the "libjportaudio.jnilib". So I added a Build Phase that copied the library to "/Users/phil/Library/Java/Extensions".
cannam@162 63
cannam@162 64 On the Mac we can create a universal library for both 32 and 64-bit JVMs. So in the JAR file I will open "jportaudio" on Apple. ON WIndows I will continue to open "jportaudio_x64" and "jportaudio_x86".
cannam@162 65 */