Class SOFTLoopback


  • public class SOFTLoopback
    extends java.lang.Object
    Native bindings to the SOFT_loopback extension.

    This extension allows an application to read back OpenAL's rendered audio instead of having it output to an audio device on the system. Unextended OpenAL will output audio to an audio device, with no mechanism to allow an application to divert the audio somewhere else.

    • Method Detail

      • nalcLoopbackOpenDeviceSOFT

        public static long nalcLoopbackOpenDeviceSOFT​(long deviceName)
        Unsafe version of: LoopbackOpenDeviceSOFT
      • alcLoopbackOpenDeviceSOFT

        public static long alcLoopbackOpenDeviceSOFT​(@Nullable
                                                     java.nio.ByteBuffer deviceName)
        
        public static long alcLoopbackOpenDeviceSOFT​(@Nullable
                                                     java.lang.CharSequence deviceName)
        
        Loopback devices provide a way for applications to "read back" rendered audio without it being sent to an actual audio device. It allows applications to render audio as fast or slow as it needs, making it suitable for non-real-time rendering, and so it can be passed to an audio codec or something for further processing.

        To open a loopback device, use this function.

        A loopback device behaves largely the same as a playback device. You may query playback state and error codes, and create contexts, which can then be set as current to generate sources and buffers like normal.

        Note that loopback devices do not have either the SYNC or REFRESH attributes. Attempting to query them will result in an INVALID_ENUM error.

        Parameters:
        deviceName - which device or device driver to use for subsequent rendering. This may be NULL for an implementation-defined default, otherwise it must be a valid name returned by enumeration (and further must be a device capable of loopback rendering).
      • nalcRenderSamplesSOFT

        public static void nalcRenderSamplesSOFT​(long device,
                                                 long buffer,
                                                 int samples)
        Unsafe version of: RenderSamplesSOFT
      • alcRenderSamplesSOFT

        public static void alcRenderSamplesSOFT​(long device,
                                                java.nio.ByteBuffer buffer,
                                                int samples)
        
        public static void alcRenderSamplesSOFT​(long device,
                                                java.nio.ShortBuffer buffer,
                                                int samples)
        
        public static void alcRenderSamplesSOFT​(long device,
                                                java.nio.IntBuffer buffer,
                                                int samples)
        
        public static void alcRenderSamplesSOFT​(long device,
                                                java.nio.FloatBuffer buffer,
                                                int samples)
        
        The state of various objects on loopback devices (including processed buffers and source offsets) is processed only when new samples are rendered. To render samples, use this function.
        Parameters:
        device - the loopback device which samples are rendered from, using its contexts and associated buffers and sources
        buffer - the buffer that will receive the samples. It must be big enough to contain at least samples sample frames.
        samples - the number of sample frames to render
      • alcRenderSamplesSOFT

        public static void alcRenderSamplesSOFT​(long device,
                                                short[] buffer,
                                                int samples)
        
        public static void alcRenderSamplesSOFT​(long device,
                                                int[] buffer,
                                                int samples)
        
        public static void alcRenderSamplesSOFT​(long device,
                                                float[] buffer,
                                                int samples)
        
        Array version of: RenderSamplesSOFT