Top Description Fields Constructors Methods
org.lwjgl.openal

public final Class EFXUtil

extends Object
Class Inheritance
Static Imports
org.lwjgl.openal.AL10.*, org.lwjgl.openal.EFX10.*

Utility class for the OpenAL extension ALC_EXT_EFX. Provides functions to check for the extension and support of various effects and filters.

Currently supports ALC_EXT_EFX version 1.0 effects and filters.

Author
Ciardhubh
Version
$Revision$ $Id$

Field Summary

Modifier and TypeField and Description
private static final int
EFFECT

Constant for testSupportGeneric to check an effect.

private static final int
FILTER

Constant for testSupportGeneric to check a filter.

Constructor Summary

AccessConstructor and Description
private
EFXUtil()

Utility class, hidden contructor.

Method Summary

Modifier and TypeMethod and Description
public static boolean

Returns:

True if it is supported, false if not.
isEffectSupported
(final int
Type of effect whose support is to be tested, e.g. AL_EFFECT_REVERB.
effectType
)

Tests OpenAL to see whether the given effect type is supported.

public static boolean

Returns:

True if ALC_EXT_EFX is supported, false if not.
isEfxSupported
()

Checks if OpenAL implementation is loaded and supports ALC_EXT_EFX.

public static boolean

Returns:

True if it is supported, false if not.
isFilterSupported
(final int
Type of filter whose support is to be tested, e.g. AL_FILTER_LOWPASS.
filterType
)

Tests OpenAL to see whether the given filter type is supported.

private static boolean

Returns:

True if object supports typeValue, false else.
testSupportGeneric
(final int
Type of object to test. Must be either EFXUtil.EFFECT or EFXUtil.FILTER.
objectType
,
final int
OpenAL type the object should be tested for support, e.g. AL_FILTER_LOWPASS or AL_EFFECT_REVERB.
typeValue
)

Generic test function to see if an EFX object supports a given kind of type.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

EFFECTback to summary
private static final int EFFECT

Constant for testSupportGeneric to check an effect.

FILTERback to summary
private static final int FILTER

Constant for testSupportGeneric to check a filter.

Constructor Detail

EFXUtilback to summary
private EFXUtil()

Utility class, hidden contructor.

Method Detail

isEffectSupportedback to summary
public static boolean isEffectSupported(final int effectType)

Tests OpenAL to see whether the given effect type is supported. This is done by creating an effect of the given type. If creation succeeds the effect is supported.

Parameters
effectType:int

Type of effect whose support is to be tested, e.g. AL_EFFECT_REVERB.

Returns:boolean

True if it is supported, false if not.

Exceptions
OpenALException:
If the request fails due to an AL_OUT_OF_MEMORY error or OpenAL has not been created yet.
IllegalArgumentException:
effectType is not a valid effect type.
isEfxSupportedback to summary
public static boolean isEfxSupported()

Checks if OpenAL implementation is loaded and supports ALC_EXT_EFX.

Returns:boolean

True if ALC_EXT_EFX is supported, false if not.

Exceptions
OpenALException:
If OpenAL has not been created yet.
isFilterSupportedback to summary
public static boolean isFilterSupported(final int filterType)

Tests OpenAL to see whether the given filter type is supported. This is done by creating a filter of the given type. If creation succeeds the filter is supported.

Parameters
filterType:int

Type of filter whose support is to be tested, e.g. AL_FILTER_LOWPASS.

Returns:boolean

True if it is supported, false if not.

Exceptions
OpenALException:
If the request fails due to an AL_OUT_OF_MEMORY error or OpenAL has not been created yet.
IllegalArgumentException:
filterType is not a valid filter type.
testSupportGenericback to summary
private static boolean testSupportGeneric(final int objectType, final int typeValue)

Generic test function to see if an EFX object supports a given kind of type. Works for effects and filters.

Parameters
objectType:int

Type of object to test. Must be either EFXUtil.EFFECT or EFXUtil.FILTER.

typeValue:int

OpenAL type the object should be tested for support, e.g. AL_FILTER_LOWPASS or AL_EFFECT_REVERB.

Returns:boolean

True if object supports typeValue, false else.