Chris@55: /**
Chris@55: @page java_binding JPortAudio Java Binding
Chris@55: @ingroup jportaudio
Chris@55:
Chris@55: Note: this page has not been reviewed, and may contain errors.
Chris@55:
Chris@55: @section java_draft DRAFT - IN PROGRESS
Chris@55:
Chris@55: 9/4/12 JPortAudio is very new and should be considered an "alpha" release.
Chris@55: The building of JPortAudio will eventually be integrated into the Makefile as an optional build.
Chris@55:
Chris@55: Currently JPortAudio is only supported for Windows and Macintosh. Please contact us if you want to help with porting Linux.
Chris@55:
Chris@55: For reference documentation of the JPortAudio API see: com.portaudio.PortAudio
Chris@55:
Chris@55: For an example see: PlaySine.java
Chris@55:
Chris@55: @section java_comp_windows Building JPortAudio on Windows
Chris@55:
Chris@55: Build the Java code using the Eclipse project in "jportaudio". Export as "jportaudio.jar".
Chris@55:
Chris@55: If you modify the JNI API then you will need to regenerate the JNI .h files using:
Chris@55:
Chris@55: @code
Chris@55: cd bindings/java/scripts
Chris@55: make_header.bat
Chris@55: @endcode
Chris@55:
Chris@55: Build the JNI DLL using the Visual Studio 2010 solution in "java/c/build/vs2010/PortAudioJNI".
Chris@55:
Chris@55: @section java_use_windows Using JPortAudio on Windows
Chris@55:
Chris@55: Put the "jportaudio.jar" in the classpath for your application.
Chris@55: Place the following libraries where they can be found, typically in the same folder as your application.
Chris@55:
Chris@55: - portaudio_x86.dll
Chris@55: - portaudio_x64.dll
Chris@55: - jportaudio_x86.dll
Chris@55: - jportaudio_x64.dll
Chris@55:
Chris@55: @section java_comp_max Building JPortAudio on Mac
Chris@55:
Chris@55: These are notes from building JPortAudio on a Mac with 10.6.8 and XCode 4.
Chris@55:
Chris@55: I created a target of type 'C' library.
Chris@55:
Chris@55: I added the regular PortAudio frameworks plus the JavaVM framework.
Chris@55:
Chris@55: I modified com_portaudio_PortAudio.h and com_portaudio_BlockingStream.h so that jni.h could found.
Chris@55:
Chris@55: @code
Chris@55: #if defined(__APPLE__)
Chris@55: #include
Chris@55: #else
Chris@55: #include
Chris@55: #endif
Chris@55: @endcode
Chris@55:
Chris@55: This is bad because those header files are autogenerated and will be overwritten.
Chris@55: We need a better solution for this.
Chris@55:
Chris@55: I had trouble finding the "libjportaudio.jnilib". So I added a Build Phase that copied the library to "/Users/phil/Library/Java/Extensions".
Chris@55:
Chris@55: 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".
Chris@55: */