Class ALC11


  • public final class ALC11
    extends java.lang.Object

    The ALC11 class implements features in OpenAL 1.1, specifically ALC methods and properties.

    Version:
    $Revision: 2286 $ $Id: ALC.java 2286 2006-03-23 19:32:21 +0000 (to, 23 mar 2006) matzon $
    Author:
    Brian Matzon
    See Also:
    ALC10
    • Constructor Summary

      Constructors 
      Constructor Description
      ALC11()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean alcCaptureCloseDevice​(ALCdevice device)
      The alcCaptureCloseDevice function allows the application to disconnect from a capture device.
      static ALCdevice alcCaptureOpenDevice​(java.lang.String devicename, int frequency, int format, int buffersize)
      The alcCaptureOpenDevice function allows the application to connect to a capture device.
      static void alcCaptureSamples​(ALCdevice device, java.nio.ByteBuffer buffer, int samples)
      When the application feels there are enough samples available to process, it can obtain them from the AL via the alcCaptureSamples entry point.
      static void alcCaptureStart​(ALCdevice device)
      Once a capture device has been opened via alcCaptureOpenDevice, it is made to start recording audio via the alcCaptureStart entry point: Once started, the device will record audio to an internal ring buffer, the size of which was specified when opening the device.
      static void alcCaptureStop​(ALCdevice device)
      If the application doesn't need to capture more audio for an amount of time, they can halt the device without closing it via the alcCaptureStop entry point.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • ALC_DEFAULT_ALL_DEVICES_SPECIFIER

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

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

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

        public static final int ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER
        See Also:
        Constant Field Values
    • Constructor Detail

      • ALC11

        public ALC11()
    • Method Detail

      • alcCaptureOpenDevice

        public static ALCdevice alcCaptureOpenDevice​(java.lang.String devicename,
                                                     int frequency,
                                                     int format,
                                                     int buffersize)
        The alcCaptureOpenDevice function allows the application to connect to a capture device. To obtain a list of all available capture devices, use getCaptureDevices a list of all capture devices will be returned. Retrieving ALC_CAPTURE_DEVICE_SPECIFIER with a valid capture device specified will result in the name of that device being returned as a single string. If the function returns null, then no sound driver/device has been found, or the requested format could not be fulfilled. The "deviceName" argument is a string that requests a certain device or device configuration. If null is specified, the implementation will provide an implementation specific default. The "frequency" and "format" arguments specify the format that audio data will be presented to the application, and match the values that can be passed to alBufferData. The implementation is expected to convert and resample to this format on behalf of the application. The "buffersize" argument specifies the number of sample frames to buffer in the AL, for example, requesting a format of AL_FORMAT_STEREO16 and a buffer size of 1024 would require the AL to store up to 1024 * 4 bytes of audio data. Note that the implementation may use a larger buffer than requested if it needs to, but the implementation will set up a buffer of at least the requested size. Specifying a compressed or extension-supplied format may result in failure, even if the extension is supplied for rendering. LWJGL SPECIFIC: the actual created device is managed internally in lwjgl
        Parameters:
        devicename - Name of device to open for capture
        frequency - Frequency of samples to capture
        format - Format of samples to capture
        buffersize - Size of buffer to capture to
        Returns:
        ALCdevice if it was possible to open a device
      • alcCaptureCloseDevice

        public static boolean alcCaptureCloseDevice​(ALCdevice device)
        The alcCaptureCloseDevice function allows the application to disconnect from a capture device. The return code will be true or false, indicating success or failure. If the device is null or invalid, an ALC_INVALID_DEVICE error will be generated. Once closed, a capture device is invalid.
        Returns:
        true if device was successfully closed
      • alcCaptureStart

        public static void alcCaptureStart​(ALCdevice device)
        Once a capture device has been opened via alcCaptureOpenDevice, it is made to start recording audio via the alcCaptureStart entry point: 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.
      • alcCaptureStop

        public static void alcCaptureStop​(ALCdevice device)
        If the application doesn't need to capture more audio for an amount of time, they can halt the device without closing it via the alcCaptureStop entry point. 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.
      • alcCaptureSamples

        public static void alcCaptureSamples​(ALCdevice device,
                                             java.nio.ByteBuffer buffer,
                                             int samples)
        When the application feels there are enough samples available to process, it can obtain them from the AL via the alcCaptureSamples entry point. The "buffer" argument specifies an application-allocated buffer that can contain at least "samples" sample frames. The implementation may defer conversion and resampling until this point. Requesting more sample frames than are currently available is an error.
        Parameters:
        buffer - Buffer to store samples in
        samples - Number of samples to request