PortAudio
2.0
|
Static Public Member Functions | |
static native int | getVersion () |
static native String | getVersionText () |
static native void | initialize () |
static native void | terminate () |
static native int | getDeviceCount () |
static DeviceInfo | getDeviceInfo (int index) |
static native int | getHostApiCount () |
static HostApiInfo | getHostApiInfo (int index) |
static native int | hostApiTypeIdToHostApiIndex (int hostApiType) |
static native int | hostApiDeviceIndexToDeviceIndex (int hostApiIndex, int apiDeviceIndex) |
static native int | getDefaultInputDevice () |
static native int | getDefaultOutputDevice () |
static native int | getDefaultHostApi () |
static native int | isFormatSupported (StreamParameters inputStreamParameters, StreamParameters outputStreamParameters, int sampleRate) |
static BlockingStream | openStream (StreamParameters inputStreamParameters, StreamParameters outputStreamParameters, int sampleRate, int framesPerBuffer, int flags) |
Static Public Attributes | |
static final int | FLAG_CLIP_OFF = (1 << 0) |
static final int | FLAG_DITHER_OFF = (1 << 1) |
static final int | FORMAT_FLOAT_32 = (1 << 0) |
static final int | FORMAT_INT_32 = (1 << 1) |
static final int | FORMAT_INT_24 = (1 << 2) |
static final int | FORMAT_INT_16 = (1 << 3) |
static final int | FORMAT_INT_8 = (1 << 4) |
static final int | FORMAT_UINT_8 = (1 << 5) |
static final int | HOST_API_TYPE_DEV = 0 |
static final int | HOST_API_TYPE_DIRECTSOUND = 1 |
static final int | HOST_API_TYPE_MME = 2 |
static final int | HOST_API_TYPE_ASIO = 3 |
static final int | HOST_API_TYPE_SOUNDMANAGER = 4 |
static final int | HOST_API_TYPE_COREAUDIO = 5 |
static final int | HOST_API_TYPE_OSS = 7 |
static final int | HOST_API_TYPE_ALSA = 8 |
static final int | HOST_API_TYPE_AL = 9 |
static final int | HOST_API_TYPE_BEOS = 10 |
static final int | HOST_API_TYPE_WDMKS = 11 |
static final int | HOST_API_TYPE_JACK = 12 |
static final int | HOST_API_TYPE_WASAPI = 13 |
static final int | HOST_API_TYPE_AUDIOSCIENCE = 14 |
static final int | HOST_API_TYPE_COUNT = 15 |
Java methods that call PortAudio via JNI. This is a portable audio I/O library that can be used as an alternative to JavaSound.
Please see the PortAudio documentation for a full explanation.
http://portaudio.com/docs/ http://portaudio.com/docs/v19-doxydocs/portaudio_8h.html
This Java binding does not support audio callbacks because an audio callback should never block. Calling into a Java virtual machine might block for garbage collection or synchronization. So only the blocking read/write mode is supported.
Definition at line 69 of file PortAudio.java.
|
static |
|
inlinestatic |
index | A valid device index in the range 0 to (getDeviceCount()-1) |
RuntimeException | if the device parameter is out of range. |
Definition at line 169 of file PortAudio.java.
References com.portaudio.PortAudio.getHostApiCount().
|
static |
Referenced by com.portaudio.PortAudio.getDeviceInfo().
|
inlinestatic |
index |
Definition at line 188 of file PortAudio.java.
References com.portaudio.PortAudio.hostApiDeviceIndexToDeviceIndex(), com.portaudio.PortAudio.hostApiTypeIdToHostApiIndex(), and com.portaudio.PortAudio.isFormatSupported().
|
static |
|
static |
|
static |
hostApiIndex | A valid host API index ranging from 0 to (getHostApiCount()-1) |
apiDeviceIndex | A valid per-host device index in the range 0 to (getHostApiInfo(hostApi).deviceCount-1) |
Referenced by com.portaudio.PortAudio.getHostApiInfo().
|
static |
hostApiType | A unique host API identifier, for example HOST_API_TYPE_COREAUDIO. |
Referenced by com.portaudio.PortAudio.getHostApiInfo().
|
static |
Library initialization function - call this before using PortAudio. This function initializes internal data structures and prepares underlying host APIs for use. With the exception of getVersion(), getVersionText(), and getErrorText(), this function MUST be called before using any other PortAudio API functions.
Referenced by com.portaudio.PlaySine.play().
|
static |
inputStreamParameters | input description, may be null |
outputStreamParameters | output description, may be null |
sampleRate | typically 44100 or 48000, or maybe 22050, 16000, 8000, 96000 |
Referenced by com.portaudio.PortAudio.getHostApiInfo().
|
inlinestatic |
inputStreamParameters | input description, may be null |
outputStreamParameters | output description, may be null |
sampleRate | typically 44100 or 48000, or maybe 22050, 16000, 8000, 96000 |
framesPerBuffer | |
flags |
Definition at line 250 of file PortAudio.java.
|
static |
Library termination function - call this when finished using PortAudio. This function deallocates all resources allocated by PortAudio since it was initialized by a call to initialize(). In cases where Pa_Initialise() has been called multiple times, each call must be matched with a corresponding call to terminate(). The final matching call to terminate() will automatically close any PortAudio streams that are still open.
Referenced by com.portaudio.PlaySine.play().
|
static |
Sample Formats
Definition at line 75 of file PortAudio.java.
Referenced by com.portaudio.BlockingStream.read(), and com.portaudio.BlockingStream.write().
|
static |
These HOST_API_TYPES will not change in the future.
Definition at line 83 of file PortAudio.java.
|
static |
Apple Sound Manager. Obsolete.
Definition at line 88 of file PortAudio.java.