Class SOFTLoopback
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.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Accepted by thechannels
parameter ofIsRenderFormatSupportedSOFT
.static final int
Accepted by thechannels
parameter ofIsRenderFormatSupportedSOFT
.static final int
Accepted by thechannels
parameter ofIsRenderFormatSupportedSOFT
.static final int
Accepted by thetype
parameter ofIsRenderFormatSupportedSOFT
.static final int
Accepted by thetype
parameter ofIsRenderFormatSupportedSOFT
.static final int
Accepted as part of theattrList
parameter ofCreateContext
.static final int
Accepted as part of theattrList
parameter ofCreateContext
.static final int
Accepted by thetype
parameter ofIsRenderFormatSupportedSOFT
.static final int
Accepted by thechannels
parameter ofIsRenderFormatSupportedSOFT
.static final int
Accepted by thechannels
parameter ofIsRenderFormatSupportedSOFT
.static final int
Accepted by thetype
parameter ofIsRenderFormatSupportedSOFT
.static final int
Accepted by thechannels
parameter ofIsRenderFormatSupportedSOFT
.static final int
Accepted by thetype
parameter ofIsRenderFormatSupportedSOFT
.static final int
Accepted by thetype
parameter ofIsRenderFormatSupportedSOFT
.static final int
Accepted by thetype
parameter ofIsRenderFormatSupportedSOFT
. -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
alcIsRenderFormatSupportedSOFT
(long device, int frequency, int channels, int type) When creating contexts, the attribute list must specify the format used for rendering.static long
alcLoopbackOpenDeviceSOFT
(CharSequence deviceName) Loopback devices provide a way for applications to "read back" rendered audio without it being sent to an actual audio device.static long
alcLoopbackOpenDeviceSOFT
(ByteBuffer deviceName) Loopback devices provide a way for applications to "read back" rendered audio without it being sent to an actual audio device.static void
alcRenderSamplesSOFT
(long device, float[] buffer, int samples) Array version of:RenderSamplesSOFT
static void
alcRenderSamplesSOFT
(long device, int[] buffer, int samples) Array version of:RenderSamplesSOFT
static void
alcRenderSamplesSOFT
(long device, short[] buffer, int samples) Array version of:RenderSamplesSOFT
static void
alcRenderSamplesSOFT
(long device, ByteBuffer 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.static void
alcRenderSamplesSOFT
(long device, 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.static void
alcRenderSamplesSOFT
(long device, IntBuffer 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.static void
alcRenderSamplesSOFT
(long device, ShortBuffer 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.static long
nalcLoopbackOpenDeviceSOFT
(long deviceName) Unsafe version of:LoopbackOpenDeviceSOFT
static void
nalcRenderSamplesSOFT
(long device, long buffer, int samples) Unsafe version of:RenderSamplesSOFT
-
Field Details
-
ALC_BYTE_SOFT
public static final int ALC_BYTE_SOFTAccepted by thetype
parameter ofIsRenderFormatSupportedSOFT
.- See Also:
-
ALC_UNSIGNED_BYTE_SOFT
public static final int ALC_UNSIGNED_BYTE_SOFTAccepted by thetype
parameter ofIsRenderFormatSupportedSOFT
.- See Also:
-
ALC_SHORT_SOFT
public static final int ALC_SHORT_SOFTAccepted by thetype
parameter ofIsRenderFormatSupportedSOFT
.- See Also:
-
ALC_UNSIGNED_SHORT_SOFT
public static final int ALC_UNSIGNED_SHORT_SOFTAccepted by thetype
parameter ofIsRenderFormatSupportedSOFT
.- See Also:
-
ALC_INT_SOFT
public static final int ALC_INT_SOFTAccepted by thetype
parameter ofIsRenderFormatSupportedSOFT
.- See Also:
-
ALC_UNSIGNED_INT_SOFT
public static final int ALC_UNSIGNED_INT_SOFTAccepted by thetype
parameter ofIsRenderFormatSupportedSOFT
.- See Also:
-
ALC_FLOAT_SOFT
public static final int ALC_FLOAT_SOFTAccepted by thetype
parameter ofIsRenderFormatSupportedSOFT
.- See Also:
-
ALC_MONO_SOFT
public static final int ALC_MONO_SOFTAccepted by thechannels
parameter ofIsRenderFormatSupportedSOFT
.- See Also:
-
ALC_STEREO_SOFT
public static final int ALC_STEREO_SOFTAccepted by thechannels
parameter ofIsRenderFormatSupportedSOFT
.- See Also:
-
ALC_QUAD_SOFT
public static final int ALC_QUAD_SOFTAccepted by thechannels
parameter ofIsRenderFormatSupportedSOFT
.- See Also:
-
ALC_5POINT1_SOFT
public static final int ALC_5POINT1_SOFTAccepted by thechannels
parameter ofIsRenderFormatSupportedSOFT
.- See Also:
-
ALC_6POINT1_SOFT
public static final int ALC_6POINT1_SOFTAccepted by thechannels
parameter ofIsRenderFormatSupportedSOFT
.- See Also:
-
ALC_7POINT1_SOFT
public static final int ALC_7POINT1_SOFTAccepted by thechannels
parameter ofIsRenderFormatSupportedSOFT
.- See Also:
-
ALC_FORMAT_CHANNELS_SOFT
public static final int ALC_FORMAT_CHANNELS_SOFTAccepted as part of theattrList
parameter ofCreateContext
.- See Also:
-
ALC_FORMAT_TYPE_SOFT
public static final int ALC_FORMAT_TYPE_SOFTAccepted as part of theattrList
parameter ofCreateContext
.- See Also:
-
-
Method Details
-
nalcLoopbackOpenDeviceSOFT
public static long nalcLoopbackOpenDeviceSOFT(long deviceName) Unsafe version of:LoopbackOpenDeviceSOFT
-
alcLoopbackOpenDeviceSOFT
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
orREFRESH
attributes. Attempting to query them will result in anINVALID_ENUM
error.- Parameters:
deviceName
- which device or device driver to use for subsequent rendering. This may beNULL
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).
-
alcLoopbackOpenDeviceSOFT
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
orREFRESH
attributes. Attempting to query them will result in anINVALID_ENUM
error.- Parameters:
deviceName
- which device or device driver to use for subsequent rendering. This may beNULL
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).
-
alcIsRenderFormatSupportedSOFT
public static boolean alcIsRenderFormatSupportedSOFT(long device, int frequency, int channels, int type) When creating contexts, the attribute list must specify the format used for rendering. This is done with theFORMAT_CHANNELS_SOFT
,FORMAT_TYPE_SOFT
, andFREQUENCY
attributes. This controls the format of the audio subsequently rendered by the device.To check if a particular rendering format is available, use this function.
- Parameters:
device
- the loopback device to queryfrequency
- the sample rate of the rendered audiochannels
- the channel configuration used for rendering. One of:MONO_SOFT
STEREO_SOFT
QUAD_SOFT
5POINT1_SOFT
6POINT1_SOFT
7POINT1_SOFT
type
- sample type of the written audio. One of:BYTE_SOFT
UNSIGNED_BYTE_SOFT
SHORT_SOFT
UNSIGNED_SHORT_SOFT
INT_SOFT
UNSIGNED_INT_SOFT
FLOAT_SOFT
-
nalcRenderSamplesSOFT
public static void nalcRenderSamplesSOFT(long device, long buffer, int samples) Unsafe version of:RenderSamplesSOFT
-
alcRenderSamplesSOFT
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 sourcesbuffer
- 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 render
-
alcRenderSamplesSOFT
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 sourcesbuffer
- 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 render
-
alcRenderSamplesSOFT
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 sourcesbuffer
- 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 render
-
alcRenderSamplesSOFT
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 sourcesbuffer
- 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 render
-
alcRenderSamplesSOFT
public static void alcRenderSamplesSOFT(long device, short[] buffer, int samples) Array version of:RenderSamplesSOFT
-
alcRenderSamplesSOFT
public static void alcRenderSamplesSOFT(long device, int[] buffer, int samples) Array version of:RenderSamplesSOFT
-
alcRenderSamplesSOFT
public static void alcRenderSamplesSOFT(long device, float[] buffer, int samples) Array version of:RenderSamplesSOFT
-