Class ALC11



  • public class ALC11
    extends java.lang.Object
    Native bindings to ALC 1.1 functionality.
    • Field Detail

      • ALC_MONO_SOURCES

        public static final int ALC_MONO_SOURCES
        Context creation attributes.
        See Also:
        Constant Field Values
      • ALC_STEREO_SOURCES

        public static final int ALC_STEREO_SOURCES
        Context creation attributes.
        See Also:
        Constant Field Values
      • ALC_DEFAULT_ALL_DEVICES_SPECIFIER

        public static final int ALC_DEFAULT_ALL_DEVICES_SPECIFIER
        String queries.
        See Also:
        Constant Field Values
      • ALC_ALL_DEVICES_SPECIFIER

        public static final int ALC_ALL_DEVICES_SPECIFIER
        String queries.
        See Also:
        Constant Field Values
      • ALC_CAPTURE_DEVICE_SPECIFIER

        public static final int ALC_CAPTURE_DEVICE_SPECIFIER
        String queries.
        See Also:
        Constant Field Values
      • ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER

        public static final int ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER
        String queries.
        See Also:
        Constant Field Values
      • ALC_CAPTURE_SAMPLES

        public static final int ALC_CAPTURE_SAMPLES
        Integer queries.
        See Also:
        Constant Field Values
    • Method Detail

      • alcCaptureOpenDevice

        public static long alcCaptureOpenDevice(java.nio.ByteBuffer devicename,
                                                int frequency,
                                                int format,
                                                int buffersize)
        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. If NULL is specified, the implementation will provide an implementation specific default.

        Parameters:
        devicename - the device or device configuration
        frequency - the audio frequency
        format - the audio format
        buffersize - the number of sample frame to buffer in the AL
      • alcCaptureOpenDevice

        public static long alcCaptureOpenDevice(java.lang.CharSequence devicename,
                                                int frequency,
                                                int format,
                                                int buffersize)
        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. If NULL is specified, the implementation will provide an implementation specific default.

        Parameters:
        devicename - the device or device configuration
        frequency - the audio frequency
        format - the audio format
        buffersize - the number of sample frame 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
      • alcCaptureSamples

        public static void alcCaptureSamples(long device,
                                             java.nio.ByteBuffer buffer)
        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 device
        buffer - the buffer that will receive the samples