Class EXTCapture
ALC_EXT_CAPTURE
extension.
An OpenAL 1.1 implementation will always support the ALC_EXT_CAPTURE
extension. This allows an application written to the OpenAL 1.0 specification to
access the capture abilities.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
String queries.static final int
String queries.static final int
Integer queries. -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
alcCaptureCloseDevice
(long device) Allows the application to disconnect from a capture device.static long
alcCaptureOpenDevice
(CharSequence deviceName, int frequency, int format, int samples) Allows the application to connect to a capture device.static long
alcCaptureOpenDevice
(ByteBuffer deviceName, int frequency, int format, int samples) Allows the application to connect to a capture device.static void
alcCaptureSamples
(long device, float[] buffer, int samples) Array version of:CaptureSamples
static void
alcCaptureSamples
(long device, int[] buffer, int samples) Array version of:CaptureSamples
static void
alcCaptureSamples
(long device, short[] buffer, int samples) Array version of:CaptureSamples
static void
alcCaptureSamples
(long device, ByteBuffer buffer, int samples) Obtains captured audio samples from the AL.static void
alcCaptureSamples
(long device, FloatBuffer buffer, int samples) Obtains captured audio samples from the AL.static void
alcCaptureSamples
(long device, IntBuffer buffer, int samples) Obtains captured audio samples from the AL.static void
alcCaptureSamples
(long device, ShortBuffer buffer, int samples) Obtains captured audio samples from the AL.static void
alcCaptureStart
(long device) Starts recording audio on the specific capture device.static void
alcCaptureStop
(long device) Halts audio capturing without closing the capture device.static long
nalcCaptureOpenDevice
(long deviceName, int frequency, int format, int samples) Unsafe version of:CaptureOpenDevice
static void
nalcCaptureSamples
(long device, long buffer, int samples) Unsafe version of:CaptureSamples
-
Field Details
-
ALC_CAPTURE_DEVICE_SPECIFIER
public static final int ALC_CAPTURE_DEVICE_SPECIFIERString queries.- See Also:
-
ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER
public static final int ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIERString queries.- See Also:
-
ALC_CAPTURE_SAMPLES
public static final int ALC_CAPTURE_SAMPLESInteger queries.- See Also:
-
-
Method Details
-
nalcCaptureOpenDevice
public static long nalcCaptureOpenDevice(long deviceName, int frequency, int format, int samples) Unsafe version of:CaptureOpenDevice
-
alcCaptureOpenDevice
public static long alcCaptureOpenDevice(@Nullable ByteBuffer deviceName, int frequency, int format, int samples) Allows the application to connect to a capture device.The
deviceName
argument is a null terminated string that requests a certain device or device configuration. IfNULL
is specified, the implementation will provide an implementation specific default.- Parameters:
deviceName
- the device or device configurationfrequency
- the audio frequencyformat
- the audio formatsamples
- the number of sample frames to buffer in the AL
-
alcCaptureOpenDevice
public static long alcCaptureOpenDevice(@Nullable CharSequence deviceName, int frequency, int format, int samples) Allows the application to connect to a capture device.The
deviceName
argument is a null terminated string that requests a certain device or device configuration. IfNULL
is specified, the implementation will provide an implementation specific default.- Parameters:
deviceName
- the device or device configurationfrequency
- the audio frequencyformat
- the audio formatsamples
- the number of sample frames to buffer in the AL
-
alcCaptureCloseDevice
public static boolean alcCaptureCloseDevice(long device) Allows the application to disconnect from a capture device.- Parameters:
device
- the capture device to close
-
alcCaptureStart
public static void alcCaptureStart(long device) Starts recording audio on the specific capture device.Once started, the device will record audio to an internal ring buffer, the size of which was specified when opening the device. The application may query the capture device to discover how much data is currently available via the alcGetInteger with the ALC_CAPTURE_SAMPLES token. This will report the number of sample frames currently available.
- Parameters:
device
- the capture device
-
alcCaptureStop
public static void alcCaptureStop(long device) Halts audio capturing without closing the capture device.The implementation is encouraged to optimize for this case. The amount of audio samples available after restarting a stopped capture device is reset to zero. The application does not need to stop the capture device to read from it.
- Parameters:
device
- the capture device
-
nalcCaptureSamples
public static void nalcCaptureSamples(long device, long buffer, int samples) Unsafe version of:CaptureSamples
-
alcCaptureSamples
Obtains captured audio samples from the AL.The implementation may defer conversion and resampling until this point. Requesting more sample frames than are currently available is an error.
- Parameters:
device
- the capture devicebuffer
- the buffer that will receive the samples. It must be big enough to contain at leastsamples
sample frames.samples
- the number of sample frames to obtain
-
alcCaptureSamples
Obtains captured audio samples from the AL.The implementation may defer conversion and resampling until this point. Requesting more sample frames than are currently available is an error.
- Parameters:
device
- the capture devicebuffer
- the buffer that will receive the samples. It must be big enough to contain at leastsamples
sample frames.samples
- the number of sample frames to obtain
-
alcCaptureSamples
Obtains captured audio samples from the AL.The implementation may defer conversion and resampling until this point. Requesting more sample frames than are currently available is an error.
- Parameters:
device
- the capture devicebuffer
- the buffer that will receive the samples. It must be big enough to contain at leastsamples
sample frames.samples
- the number of sample frames to obtain
-
alcCaptureSamples
Obtains captured audio samples from the AL.The implementation may defer conversion and resampling until this point. Requesting more sample frames than are currently available is an error.
- Parameters:
device
- the capture devicebuffer
- the buffer that will receive the samples. It must be big enough to contain at leastsamples
sample frames.samples
- the number of sample frames to obtain
-
alcCaptureSamples
public static void alcCaptureSamples(long device, short[] buffer, int samples) Array version of:CaptureSamples
-
alcCaptureSamples
public static void alcCaptureSamples(long device, int[] buffer, int samples) Array version of:CaptureSamples
-
alcCaptureSamples
public static void alcCaptureSamples(long device, float[] buffer, int samples) Array version of:CaptureSamples
-