diff --git a/Source/OpenTK/OpenAL/EfxFunctions.cs b/Source/OpenTK/OpenAL/EfxFunctions.cs
index 3c19a6ba..6ac5c4e3 100644
--- a/Source/OpenTK/OpenAL/EfxFunctions.cs
+++ b/Source/OpenTK/OpenAL/EfxFunctions.cs
@@ -14,28 +14,30 @@ namespace OpenTK.OpenAL
{
public partial class Efx
{
- /**
- * Effect object functions.
- */
+
+ //Effect object functions.
+
/* Create Effect objects. */
// typedef void (__cdecl *LPALGENEFFECTS)( ALsizei n, ALuint* effects );
- unsafe private delegate void alGenEffects(int n, [Out] uint* effects);
+ unsafe private delegate void DelegatealGenEffects(int n, [Out] uint* effects);
/* Delete Effect objects. */
// typedef void (__cdecl *LPALDELETEEFFECTS)( ALsizei n, ALuint* effects );
- unsafe private delegate void alDeleteEffects(int n, [In] uint* effects);
+ unsafe private delegate void DelegatealDeleteEffects(int n, [In] uint* effects);
/* Verify a handle is a valid Effect. */
// typedef ALboolean (__cdecl *LPALISEFFECT)( ALuint eid );
- public delegate AL.Bool alIsEffect(uint eid);
+ private delegate AL.Bool DelegatealIsEffect(uint eid);
/* Set an integer parameter for an Effect object. */
// typedef void (__cdecl *LPALEFFECTI)( ALuint eid, ALenum param, ALint value);
+ private delegate void DelegateAlEffecti( uint eid, EfxEffecti param, int value);
// typedef void (__cdecl *LPALEFFECTIV)( ALuint eid, ALenum param, ALint* values );
/* Set a floating point parameter for an Effect object. */
- // typedef void (__cdecl *LPALEFFECTF)( ALuint eid, ALenum param, ALfloat value);
+ // typedef void (__cdecl *LPALEFFECTF)( ALuint eid, ALenum param, ALfloat value);
+ private delegate void DelegateAlEffectf( uint eid, EfxEffectf param, float value);
// typedef void (__cdecl *LPALEFFECTFV)( ALuint eid, ALenum param, ALfloat* values );
/* Get an integer parameter for an Effect object. */
@@ -47,9 +49,8 @@ namespace OpenTK.OpenAL
// typedef void (__cdecl *LPALGETEFFECTFV)( ALuint eid, ALenum pname, ALfloat* values );
- /**
- * Filter object functions
- */
+ // Filter object functions
+
/* Create Filter objects. */
// typedef void (__cdecl *LPALGENFILTERS)( ALsizei n, ALuint* filters );
@@ -77,9 +78,8 @@ namespace OpenTK.OpenAL
// typedef void (__cdecl *LPALGETFILTERFV)( ALuint fid, ALenum pname, ALfloat* values );
- /**
- * Auxiliary Slot object functions
- */
+ // Auxiliary Slot object functions
+
/* Create Auxiliary Slot objects. */
// typedef void (__cdecl *LPALGENAUXILIARYEFFECTSLOTS)( ALsizei n, ALuint* slots );
diff --git a/Source/OpenTK/OpenAL/EfxTokens.cs b/Source/OpenTK/OpenAL/EfxTokens.cs
index 2a2c12c2..e8b0015f 100644
--- a/Source/OpenTK/OpenAL/EfxTokens.cs
+++ b/Source/OpenTK/OpenAL/EfxTokens.cs
@@ -82,133 +82,121 @@ namespace OpenTK.OpenAL
AL_AUXILIARY_SEND_FILTER_GAINHF_AUTO = 0x2000C,
}
- /**
- * Effect object definitions to be used with alEffect functions.
- *
- * Effect parameter value definitions, ranges, and defaults
- * appear farther down in this file.
- */
+ #region Effect object definitions to be used with alEffect functions.
- /* Reverb Parameters */
- public enum AL_EFFECT_REVERB : int
+ public enum EfxEffectf : int
{
- ///Range [0.0f .. 1.0f] Default: 0.1f
+ ///Reverb Parameter. Range [0.0f .. 1.0f] Default: 0.1f
AL_REVERB_DENSITY = 0x0001,
- ///Range [0.0f .. 1.0f] Default: 0.1f
+ ///Reverb Parameter. Range [0.0f .. 1.0f] Default: 0.1f
AL_REVERB_DIFFUSION = 0x0002,
- ///Range [0.0f .. 1.0f] Default: 0.32f
+ ///Reverb Parameter. Range [0.0f .. 1.0f] Default: 0.32f
AL_REVERB_GAIN = 0x0003,
- ///Range [0.0f .. 1.0f] Default: 0.89f
+ ///Reverb Parameter. Range [0.0f .. 1.0f] Default: 0.89f
AL_REVERB_GAINHF = 0x0004,
- ///Range [0.1f .. 20.0f] Default: 1.49f
+ ///Reverb Parameter. Unit: Seconds Range [0.1f .. 20.0f] Default: 1.49f
AL_REVERB_DECAY_TIME = 0x0005,
- ///Range [0.1f .. 2.0f] Default: 0.83f
+ ///Reverb Parameter. Range [0.1f .. 2.0f] Default: 0.83f
AL_REVERB_DECAY_HFRATIO = 0x0006,
- ///Range [0.0f .. 3.16f] Default: 0.05f
+ ///Reverb Parameter. Range [0.0f .. 3.16f] Default: 0.05f
AL_REVERB_REFLECTIONS_GAIN = 0x0007,
- ///Range [0.0f .. 0.3f] Default: 0.007f
+ ///Reverb Parameter. Unit: Seconds Range [0.0f .. 0.3f] Default: 0.007f
AL_REVERB_REFLECTIONS_DELAY = 0x0008,
- ///Range [0.0f .. 10.0f] Default: 1.26f
+ ///Reverb Parameter. Range [0.0f .. 10.0f] Default: 1.26f
AL_REVERB_LATE_REVERB_GAIN = 0x0009,
- ///Range [0.0f .. 0.1f] Default: 0.011f
+ ///Reverb Parameter. Unit: Seconds Range [0.0f .. 0.1f] Default: 0.011f
AL_REVERB_LATE_REVERB_DELAY = 0x000A,
- ///Range [0.892f .. 1.0f] Default: 0.994f
+ ///Reverb Parameter. Range [0.892f .. 1.0f] Default: 0.994f
AL_REVERB_AIR_ABSORPTION_GAINHF = 0x000B,
- ///Range [0.0f .. 10.0f] Default: 0.0f
+ ///Reverb Parameter. Range [0.0f .. 10.0f] Default: 0.0f
AL_REVERB_ROOM_ROLLOFF_FACTOR = 0x000C,
- ///Range [AL_FALSE .. AL_TRUE] Default: AL_TRUE
+ ///Reverb Parameter. Range [AL_FALSE .. AL_TRUE] Default: AL_TRUE
AL_REVERB_DECAY_HFLIMIT = 0x000D,
}
- /* Chorus Parameters */
public enum AL_EFFECT_CHORUS : int
{
- ///Range [0 .. 1] Default: 1
+ ///Chorus Parameter. Unit: (0) Sinusoid, (1) Triangle [0 .. 1] Default: 1
AL_CHORUS_WAVEFORM = 0x0001,
- ///Range [-180 .. 180] Default: 90
+ ///Chorus Parameter. Unit: Degrees Range [-180 .. 180] Default: 90
AL_CHORUS_PHASE = 0x0002,
- ///Range [0.0f .. 10.0f] Default: 1.1f
+ ///Chorus Parameter. Unit: Hz Range [0.0f .. 10.0f] Default: 1.1f
AL_CHORUS_RATE = 0x0003,
- ///Range [0.0f .. 1.0f] Default: 0.1f
+ ///Chorus Parameter. Range [0.0f .. 1.0f] Default: 0.1f
AL_CHORUS_DEPTH = 0x0004,
- ///Range [-1.0f .. +1.0f] Default: +0.25f
+ ///Chorus Parameter. Range [-1.0f .. +1.0f] Default: +0.25f
AL_CHORUS_FEEDBACK = 0x0005,
- ///Range [0.0f .. 0.016f] Default: 0.016f
+ ///Chorus Parameter. Unit: Seconds Range [0.0f .. 0.016f] Default: 0.016f
AL_CHORUS_DELAY = 0x0006,
}
- /* Distortion Parameters */
public enum AL_EFFECT_DISTORTION : int
{
- ///Range [0.0f .. 1.0f] Default: 0.2f
+ ///Distortion Parameter. Range [0.0f .. 1.0f] Default: 0.2f
AL_DISTORTION_EDGE = 0x0001,
- ///Range [0.01f .. 1.0f] Default: 0.05f
+ ///Distortion Parameter. Range [0.01f .. 1.0f] Default: 0.05f
AL_DISTORTION_GAIN = 0x0002,
- ///Range [80.0f .. 24000.0f] Default: 8000.0f
+ ///Distortion Parameter. Unit: Hz Range [80.0f .. 24000.0f] Default: 8000.0f
AL_DISTORTION_LOWPASS_CUTOFF = 0x0003,
- ///Range [80.0f .. 24000.0f] Default: 3600.0f
+ ///Distortion Parameter. Unit: Hz Range [80.0f .. 24000.0f] Default: 3600.0f
AL_DISTORTION_EQCENTER = 0x0004,
- ///Range [80.0f .. 24000.0f] Default: 3600.0f
+ ///Distortion Parameter. Unit: Hz Range [80.0f .. 24000.0f] Default: 3600.0f
AL_DISTORTION_EQBANDWIDTH = 0x0005,
}
- /* Echo Parameters */
public enum AL_EFFECT_ECHO : int
{
- ///Range [0.0f .. 0.207f] Default: 0.1f
+ ///Echo Parameter. Unit: Seconds Range [0.0f .. 0.207f] Default: 0.1f
AL_ECHO_DELAY = 0x0001,
- ///Range [0.0f .. 0.404f] Default: 0.1f
+ ///Echo Parameter. Unit: Seconds Range [0.0f .. 0.404f] Default: 0.1f
AL_ECHO_LRDELAY = 0x0002,
- ///Range [0.0f .. 0.99f] Default: 0.5f
+ ///Echo Parameter. Range [0.0f .. 0.99f] Default: 0.5f
AL_ECHO_DAMPING = 0x0003,
- ///Range [0.0f .. 1.0f] Default: 0.5f
+ ///Echo Parameter. Range [0.0f .. 1.0f] Default: 0.5f
AL_ECHO_FEEDBACK = 0x0004,
- ///Range [-1.0f .. +1.0f] Default: -1.0f
+ ///Echo Parameter. Range [-1.0f .. +1.0f] Default: -1.0f
AL_ECHO_SPREAD = 0x0005,
}
- /* Flanger Parameters */
public enum AL_EFFECT_FLANGER : int
{
- ///Range [0 .. 1] Default: 1
+ ///Flanger Parameter. Unit: (0) Sinusoid, (1) Triangle Range [0 .. 1] Default: 1
AL_FLANGER_WAVEFORM = 0x0001,
- ///Range [-180 .. +180] Default: 0
+ ///Flanger Parameter. Range [-180 .. +180] Default: 0
AL_FLANGER_PHASE = 0x0002,
- ///Range [0.0f .. 10.0f] Default: 0.27f
+ ///Flanger Parameter. Range [0.0f .. 10.0f] Default: 0.27f
AL_FLANGER_RATE = 0x0003,
- ///Range [0.0f .. 1.0f] Default: 1.0f
+ ///Flanger Parameter. Range [0.0f .. 1.0f] Default: 1.0f
AL_FLANGER_DEPTH = 0x0004,
- ///Range [-1.0f .. +1.0f] Default: -0.5f
+ ///Flanger Parameter. Range [-1.0f .. +1.0f] Default: -0.5f
AL_FLANGER_FEEDBACK = 0x0005,
- ///Range [0.0f .. 0.004f] Default: 0.002f
+ ///Flanger Parameter. Unit: Seconds Range [0.0f .. 0.004f] Default: 0.002f
AL_FLANGER_DELAY = 0x0006,
}
- /* Frequencyshifter Parameters */
public enum AL_EFFECT_FREQUENCY_SHIFTER : int
{
- ///Range [0.0f .. 24000.0f] Default: 0.0f
+ ///Frequencyshifter Parameter. Unit: Hz Range [0.0f .. 24000.0f] Default: 0.0f
AL_FREQUENCY_SHIFTER_FREQUENCY = 0x0001,
- ///Range [0 .. 2] Default: 0
+ ///Frequencyshifter Parameter. Unit: (0) Down, (1) Up, (2) Off Range [0 .. 2] Default: 0
AL_FREQUENCY_SHIFTER_LEFT_DIRECTION = 0x0002,
- ///Range [0 .. 2] Default: 0
+ ///Frequencyshifter Parameter. Unit: (0) Down, (1) Up, (2) Off Range [0 .. 2] Default: 0
AL_FREQUENCY_SHIFTER_RIGHT_DIRECTION = 0x0003,
}
- /* Vocalmorpher Parameters */
public enum AL_EFFECT_VOCAL_MORPHER : int
{
- ///Range [0 .. 92] Default: 0, AL_VOCAL_MORPHER_PHONEME_A
+ ///Vocalmorpher Parameter. Unit: Use enum FormantFilterSettings Range [0 .. 29] Default: 0, AL_VOCAL_MORPHER_PHONEME_A
AL_VOCAL_MORPHER_PHONEMEA = 0x0001,
- ///Range [-24 .. +24] Default: 0
+ ///Vocalmorpher Parameter. Unit: Semitones Range [-24 .. +24] Default: 0
AL_VOCAL_MORPHER_PHONEMEA_COARSE_TUNING = 0x0002,
- ///Range [0 .. 29] Default: 10, AL_VOCAL_MORPHER_PHONEME_ER
+ ///Vocalmorpher Parameter. Unit: Use enum FormantFilterSettings Range [0 .. 29] Default: 10, AL_VOCAL_MORPHER_PHONEME_ER
AL_VOCAL_MORPHER_PHONEMEB = 0x0003,
- ///Range [-24 .. +24] Default: 0
+ ///Vocalmorpher Parameter. Unit: Semitones Range [-24 .. +24] Default: 0
AL_VOCAL_MORPHER_PHONEMEB_COARSE_TUNING = 0x0004,
- ///Range [0 .. 2] Default: 0
+ ///Vocalmorpher Parameter. Unit: (0) Sinusoid, (1) Triangle, (2) Sawtooth Range [0 .. 2] Default: 0
AL_VOCAL_MORPHER_WAVEFORM = 0x0005,
- ///Range [0.0f .. 10.0f] Default: 1.41f
+ ///Vocalmorpher Parameter. Unit: Hz Range [0.0f .. 10.0f] Default: 1.41f
AL_VOCAL_MORPHER_RATE = 0x0006,
}
@@ -247,79 +235,128 @@ namespace OpenTK.OpenAL
AL_VOCAL_MORPHER_PHONEME_Z = 29,
}
- /* Pitchshifter Parameters */
public enum AL_EFFECT_PITCH_SHIFTER : int
{
- ///Range [-12 .. +12] Default: +12
+ ///Pitchshifter Parameter. Unit: Semitones Range [-12 .. +12] Default: +12
AL_PITCH_SHIFTER_COARSE_TUNE = 0x0001,
- ///Range [-50 .. +50] Default: 0
+ ///Pitchshifter Parameter. Unit: Cents Range [-50 .. +50] Default: 0
AL_PITCH_SHIFTER_FINE_TUNE = 0x0002,
}
- /* Ringmodulator Parameters */
public enum AL_EFFECT_RING_MODULATOR : int
{
- ///Range [0.0f .. 8000.0f] Default: 440.0f
+ ///Ringmodulator Parameter. Unit: Hz Range [0.0f .. 8000.0f] Default: 440.0f
AL_RING_MODULATOR_FREQUENCY = 0x0001,
- ///Range [0.0f .. 24000.0f] Default: 800.0f
+ ///Ringmodulator Parameter. Unit: Hz Range [0.0f .. 24000.0f] Default: 800.0f
AL_RING_MODULATOR_HIGHPASS_CUTOFF = 0x0002,
- ///Range [0 .. 2] Default: 0
+ ///Ringmodulator Parameter. Unit: (0) Sinusoid, (1) Sawtooth, (2) Square Range [0 .. 2] Default: 0
AL_RING_MODULATOR_WAVEFORM = 0x0003,
}
- /* Autowah Parameters */
public enum AL_EFFECT_AUTOWAH
{
- ///Range [0.0001f .. 1.0f] Default: 0.06f
+ ///Autowah Parameter. Unit: Seconds Range [0.0001f .. 1.0f] Default: 0.06f
AL_AUTOWAH_ATTACK_TIME = 0x0001,
- ///Range [0.0001f .. 1.0f] Default: 0.06f
+ ///Autowah Parameter. Unit: Seconds Range [0.0001f .. 1.0f] Default: 0.06f
AL_AUTOWAH_RELEASE_TIME = 0x0002,
- ///Range [2.0f .. 1000.0f] Default: 1000.0f
+ ///Autowah Parameter. Range [2.0f .. 1000.0f] Default: 1000.0f
AL_AUTOWAH_RESONANCE = 0x0003,
- ///Range [0.00003f .. 31621.0f] Default: 11.22f
+ ///Autowah Parameter. Range [0.00003f .. 31621.0f] Default: 11.22f
AL_AUTOWAH_PEAK_GAIN = 0x0004,
}
- /* Compressor Parameters */
public enum AL_EFFECT_COMPRESSOR : int
{
- ///Range [0 .. 1] Default: 1
+ ///Compressor Parameter. Unit: (0) Off, (1) On Range [0 .. 1] Default: 1
AL_COMPRESSOR_ONOFF = 0x0001,
}
- /* Equalizer Parameters */
public enum AL_EFFECT_EQUALIZER : int
{
- ///Range [0.126f .. 7.943f] Default: 1.0f
+ ///Equalizer Parameter. Range [0.126f .. 7.943f] Default: 1.0f
AL_EQUALIZER_LOW_GAIN = 0x0001,
- ///Range [50.0f .. 800.0f] Default: 200.0f
+ ///Equalizer Parameter. Unit: Hz Range [50.0f .. 800.0f] Default: 200.0f
AL_EQUALIZER_LOW_CUTOFF = 0x0002,
- ///Range [0.126f .. 7.943f] Default: 1.0f
+ ///Equalizer Parameter. Range [0.126f .. 7.943f] Default: 1.0f
AL_EQUALIZER_MID1_GAIN = 0x0003,
- ///Range [200.0f .. 3000.0f] Default: 500.0f
+ ///Equalizer Parameter. Unit: Hz Range [200.0f .. 3000.0f] Default: 500.0f
AL_EQUALIZER_MID1_CENTER = 0x0004,
- ///Range [0.01f .. 1.0f] Default: 1.0f
+ ///Equalizer Parameter. Range [0.01f .. 1.0f] Default: 1.0f
AL_EQUALIZER_MID1_WIDTH = 0x0005,
- ///Range [0.126f .. 7.943f] Default: 1.0f
+ ///Equalizer Parameter. Range [0.126f .. 7.943f] Default: 1.0f
AL_EQUALIZER_MID2_GAIN = 0x0006,
- ///Range [1000.0f .. 8000.0f] Default: 3000.0f
+ ///Equalizer Parameter. Unit: Hz Range [1000.0f .. 8000.0f] Default: 3000.0f
AL_EQUALIZER_MID2_CENTER = 0x0007,
- ///Range [0.01f .. 1.0f] Default: 1.0f
+ ///Equalizer Parameter. Range [0.01f .. 1.0f] Default: 1.0f
AL_EQUALIZER_MID2_WIDTH = 0x0008,
- ///Range [0.126f .. 7.943f] Default: 1.0f
+ ///Equalizer Parameter. Range [0.126f .. 7.943f] Default: 1.0f
AL_EQUALIZER_HIGH_GAIN = 0x0009,
- ///Range [4000.0f .. 16000.0f] Default: 6000.0f
+ ///Equalizer Parameter. Unit: Hz Range [4000.0f .. 16000.0f] Default: 6000.0f
AL_EQUALIZER_HIGH_CUTOFF = 0x000A,
}
- /* Effect type */
- public enum b : int
+ public enum AL_EFFECT_EAXREVERB : int
+ {
+ ///EAXReverb effect parameters. Range [0.0f .. 1.0f] Default: 1.0f
+ AL_EAXREVERB_DENSITY = 0x0001,
+ ///EAXReverb effect parameters. Range [0.0f .. 1.0f] Default: 1.0f
+ AL_EAXREVERB_DIFFUSION = 0x0002,
+ ///EAXReverb effect parameters. Range [0.0f .. 1.0f] Default: 0.32f
+ AL_EAXREVERB_GAIN = 0x0003,
+ ///EAXReverb effect parameters. Range [0.0f .. 1.0f] Default: 0.89f
+ AL_EAXREVERB_GAINHF = 0x0004,
+ ///EAXReverb effect parameters. Range [0.0f .. 1.0f] Default: 1.0f
+ AL_EAXREVERB_GAINLF = 0x0005,
+ ///EAXReverb effect parameters. Unit: Seconds Range [0.1f .. 20.0f] Default: 1.49f
+ AL_EAXREVERB_DECAY_TIME = 0x0006,
+ ///EAXReverb effect parameters. Range [0.1f .. 2.0f] Default: 0.83f
+ AL_EAXREVERB_DECAY_HFRATIO = 0x0007,
+ ///EAXReverb effect parameters. Range [0.1f .. 2.0f] Default: 1.0f
+ AL_EAXREVERB_DECAY_LFRATIO = 0x0008,
+ ///EAXReverb effect parameters. Range [0.0f .. 3.16f] Default: 0.05f
+ AL_EAXREVERB_REFLECTIONS_GAIN = 0x0009,
+ ///EAXReverb effect parameters. Unit: Seconds Range [0.0f .. 0.3f] Default: 0.007f
+ AL_EAXREVERB_REFLECTIONS_DELAY = 0x000A,
+ /// EAXReverb effect parameters. Unit: Vector3 Default: {0.0f, 0.0f, 0.0f}
+ AL_EAXREVERB_REFLECTIONS_PAN = 0x000B,
+ ///EAXReverb effect parameters. Range [0.0f .. 10.0f] Default: 1.26f
+ AL_EAXREVERB_LATE_REVERB_GAIN = 0x000C,
+ ///EAXReverb effect parameters. Unit: Seconds Range [0.0f .. 0.1f] Default: 0.011f
+ AL_EAXREVERB_LATE_REVERB_DELAY = 0x000D,
+ /// EAXReverb effect parameters. Unit: Vector3 Default: {0.0f, 0.0f, 0.0f}
+ AL_EAXREVERB_LATE_REVERB_PAN = 0x000E,
+ ///EAXReverb effect parameters. Range [0.075f .. 0.25f] Default: 0.25f
+ AL_EAXREVERB_ECHO_TIME = 0x000F,
+ ///EAXReverb effect parameters. Range [0.0f .. 1.0f] Default: 0.0f
+ AL_EAXREVERB_ECHO_DEPTH = 0x0010,
+ ///EAXReverb effect parameters. Range [0.04f .. 4.0f] Default: 0.25f
+ AL_EAXREVERB_MODULATION_TIME = 0x0011,
+ ///EAXReverb effect parameters. Range [0.0f .. 1.0f] Default: 0.0f
+ AL_EAXREVERB_MODULATION_DEPTH = 0x0012,
+ ///EAXReverb effect parameters. Range [0.892f .. 1.0f] Default: 0.994f
+ AL_EAXREVERB_AIR_ABSORPTION_GAINHF = 0x0013,
+ ///EAXReverb effect parameters. Unit: Hz Range [1000.0f .. 20000.0f] Default: 5000.0f
+ AL_EAXREVERB_HFREFERENCE = 0x0014,
+ ///EAXReverb effect parameters. Unit: Hz Range [20.0f .. 1000.0f] Default: 250.0f
+ AL_EAXREVERB_LFREFERENCE = 0x0015,
+ ///EAXReverb effect parameters. Range [0.0f .. 10.0f] Default: 0.0f
+ AL_EAXREVERB_ROOM_ROLLOFF_FACTOR = 0x0016,
+ ///EAXReverb effect parameters. Range [AL_FALSE .. AL_TRUE] Default: AL_TRUE
+ AL_EAXREVERB_DECAY_HFLIMIT = 0x0017,
+ }
+
+ #endregion
+
+ public enum EfxEffecti : int
{
AL_EFFECT_FIRST_PARAMETER = 0x0000,
AL_EFFECT_LAST_PARAMETER = 0x8000,
- AL_EFFECT_TYPE = 0x8001,
+ AL_EFFECT_TYPE = 0x8001, // AL.BindEffect()
+ }
- /* Effect type definitions to be used with AL_EFFECT_TYPE. */
+ ///Effect type definitions to be used with AL_EFFECT_TYPE.
+ public enum EfxEffectType : int
+ {
AL_EFFECT_NULL = 0x0000, /* Can also be used as an Effect Object ID */
AL_EFFECT_REVERB = 0x0001,
AL_EFFECT_CHORUS = 0x0002,
@@ -334,32 +371,41 @@ namespace OpenTK.OpenAL
AL_EFFECT_COMPRESSOR = 0x000B,
AL_EFFECT_EQUALIZER = 0x000C,
- /**
- * Auxiliary Slot object definitions to be used with alAuxiliaryEffectSlot functions.
- */
+ AL_EFFECT_EAXREVERB = 0x8000,
+ }
+
+ public enum EfxAuxiliarySlot : int
+ {
+ // Auxiliary Slot object definitions to be used with alAuxiliaryEffectSlot functions.
AL_EFFECTSLOT_EFFECT = 0x0001,
AL_EFFECTSLOT_GAIN = 0x0002,
AL_EFFECTSLOT_AUXILIARY_SEND_AUTO = 0x0003,
// Value to be used as an Auxiliary Slot ID to disable a source send..
-
AL_EFFECTSLOT_NULL = 0x0000,
-
}
+ #region Filter Object
+
// Filter object definitions to be used with alFilter functions.
- public enum EfxFilterParameter : int
+ public enum EfxFilterLowpass : int
{
///Range [0.0f .. 1.0f] Default: 1.0f
AL_LOWPASS_GAIN = 0x0001,
///Range [0.0f .. 1.0f] Default: 1.0f
AL_LOWPASS_GAINHF = 0x0002,
+ }
+ public enum EfxFilterHighpass : int
+ {
///Range [0.0f .. 1.0f] Default: 1.0f
AL_HIGHPASS_GAIN = 0x0001,
///Range [0.0f .. 1.0f] Default: 1.0f
AL_HIGHPASS_GAINLF = 0x0002,
+ }
+ public enum EfxFilterBandpass : int
+ {
///Range [0.0f .. 1.0f] Default: 1.0f
AL_BANDPASS_GAIN = 0x0001,
///Range [0.0f .. 1.0f] Default: 1.0f
@@ -367,78 +413,25 @@ namespace OpenTK.OpenAL
///Range [0.0f .. 1.0f] Default: 1.0f
AL_BANDPASS_GAINHF = 0x0003,
}
+
+ // Filter type
public enum EfxFilterType : int
{
- // Filter type
AL_FILTER_FIRST_PARAMETER = 0x0000,
AL_FILTER_LAST_PARAMETER = 0x8000,
AL_FILTER_TYPE = 0x8001,
+ }
+
+ // Filter type definitions to be used with AL_FILTER_TYPE.
+ public enum EfxFilterTypeDefinition : int
+ {
- // Filter type definitions to be used with AL_FILTER_TYPE.
AL_FILTER_NULL = 0x0000, // Can also be used as a Filter Object ID
AL_FILTER_LOWPASS = 0x0001,
AL_FILTER_HIGHPASS = 0x0002,
AL_FILTER_BANDPASS = 0x0003,
}
- // Effect object definitions to be used with alEffect functions.
-
-
- // AL EAXReverb effect parameters.
- public enum EaxReverb : int
- {
- ///Range [0.0f .. 1.0f] Default: 1.0f
- AL_EAXREVERB_DENSITY = 0x0001,
- ///Range [0.0f .. 1.0f] Default: 1.0f
- AL_EAXREVERB_DIFFUSION = 0x0002,
- ///Range [0.0f .. 1.0f] Default: 0.32f
- AL_EAXREVERB_GAIN = 0x0003,
- ///Range [0.0f .. 1.0f] Default: 0.89f
- AL_EAXREVERB_GAINHF = 0x0004,
- ///Range [0.0f .. 1.0f] Default: 1.0f
- AL_EAXREVERB_GAINLF = 0x0005,
- ///Range [0.1f .. 20.0f] Default: 1.49f
- AL_EAXREVERB_DECAY_TIME = 0x0006,
- ///Range [0.1f .. 2.0f] Default: 0.83f
- AL_EAXREVERB_DECAY_HFRATIO = 0x0007,
- ///Range [0.1f .. 2.0f] Default: 1.0f
- AL_EAXREVERB_DECAY_LFRATIO = 0x0008,
- ///Range [0.0f .. 3.16f] Default: 0.05f
- AL_EAXREVERB_REFLECTIONS_GAIN = 0x0009,
- ///Range [0.0f .. 0.3f] Default: 0.007f
- AL_EAXREVERB_REFLECTIONS_DELAY = 0x000A,
- /// Default: {0.0f, 0.0f, 0.0f}
- AL_EAXREVERB_REFLECTIONS_PAN = 0x000B,
- ///Range [0.0f .. 10.0f] Default: 1.26f
- AL_EAXREVERB_LATE_REVERB_GAIN = 0x000C,
- ///Range [0.0f .. 0.1f] Default: 0.011f
- AL_EAXREVERB_LATE_REVERB_DELAY = 0x000D,
- /// Default: {0.0f, 0.0f, 0.0f}
- AL_EAXREVERB_LATE_REVERB_PAN = 0x000E,
- ///Range [0.075f .. 0.25f] Default: 0.25f
- AL_EAXREVERB_ECHO_TIME = 0x000F,
- ///Range [0.0f .. 1.0f] Default: 0.0f
- AL_EAXREVERB_ECHO_DEPTH = 0x0010,
- ///Range [0.04f .. 4.0f] Default: 0.25f
- AL_EAXREVERB_MODULATION_TIME = 0x0011,
- ///Range [0.0f .. 1.0f] Default: 0.0f
- AL_EAXREVERB_MODULATION_DEPTH = 0x0012,
- ///Range [0.892f .. 1.0f] Default: 0.994f
- AL_EAXREVERB_AIR_ABSORPTION_GAINHF = 0x0013,
- ///Range [1000.0f .. 20000.0f] Default: 5000.0f
- AL_EAXREVERB_HFREFERENCE = 0x0014,
- ///Range [20.0f .. 1000.0f] Default: 250.0f
- AL_EAXREVERB_LFREFERENCE = 0x0015,
- ///Range [0.0f .. 10.0f] Default: 0.0f
- AL_EAXREVERB_ROOM_ROLLOFF_FACTOR = 0x0016,
- ///Range [AL_FALSE .. AL_TRUE] Default: AL_TRUE
- AL_EAXREVERB_DECAY_HFLIMIT = 0x0017,
- }
-
- // Effect type definitions to be used with AL_EFFECT_TYPE.
- public enum c : int
- {
- AL_EFFECT_EAXREVERB = 0x8000,
- }
+ #endregion Filter Object
}
}
diff --git a/Source/OpenTK/OpenAL/History.txt b/Source/OpenTK/OpenAL/History.txt
index 326d626a..fd4fc952 100644
--- a/Source/OpenTK/OpenAL/History.txt
+++ b/Source/OpenTK/OpenAL/History.txt
@@ -42,7 +42,12 @@ Version History:
0.5 vanilla complete
- Fix Alc.GetString( Enums.AlcGetStringList ) to terminate with 2 null, and split at 1 null
+0.6
+- Begun working on Efx
+- X-Ram changed, must be tested properly. verify parameters of GetBufferMode()
+
Next Version:
- EFX Extension
- Enums themselves require summaries (do EFX 1st)
+- use [MarshalAs(UnmanagedType)] attribute, instead of AL.Bool? investigate
- AL.BindBuffer helper function ala GL.BindBuffer? (Wraps AL.Source, better consistency)
\ No newline at end of file
diff --git a/Source/OpenTK/OpenAL/XRamExtension.cs b/Source/OpenTK/OpenAL/XRamExtension.cs
index 2fce5196..35a5cb17 100644
--- a/Source/OpenTK/OpenAL/XRamExtension.cs
+++ b/Source/OpenTK/OpenAL/XRamExtension.cs
@@ -30,17 +30,17 @@ namespace OpenTK.OpenAL
#region X-RAM Function pointer definitions
[CLSCompliant(false)]
- public unsafe delegate AL.Bool SetBufferMode(int n, ref uint buffers, int value);
+ public unsafe delegate AL.Bool DelegateSetBufferMode(int n, ref uint buffers, int value);
//typedef ALboolean (__cdecl *EAXSetBufferMode)(ALsizei n, ALuint *buffers, ALint value);
[CLSCompliant(false)]
- public delegate int GetBufferMode(uint buffer, out int value);
+ public delegate int DelegateGetBufferMode(uint buffer, out int value);
//typedef ALenum (__cdecl *EAXGetBufferMode)(ALuint buffer, ALint *value);
[CLSCompliant(false)]
- public SetBufferMode EAXSetBufferMode;
+ private DelegateSetBufferMode ImportedSetBufferMode;
[CLSCompliant(false)]
- public GetBufferMode EAXGetBufferMode;
+ private DelegateGetBufferMode ImportedGetBufferMode;
#endregion X-RAM Function pointer definitions
@@ -81,8 +81,8 @@ namespace OpenTK.OpenAL
try
{
- EAXGetBufferMode = (GetBufferMode)Marshal.GetDelegateForFunctionPointer(AL.GetProcAddress("EAXGetBufferMode"), typeof(GetBufferMode));
- EAXSetBufferMode = (SetBufferMode)Marshal.GetDelegateForFunctionPointer(AL.GetProcAddress("EAXSetBufferMode"), typeof(SetBufferMode));
+ ImportedGetBufferMode = (DelegateGetBufferMode)Marshal.GetDelegateForFunctionPointer(AL.GetProcAddress("EAXGetBufferMode"), typeof(DelegateGetBufferMode));
+ ImportedSetBufferMode = (DelegateSetBufferMode)Marshal.GetDelegateForFunctionPointer(AL.GetProcAddress("EAXSetBufferMode"), typeof(DelegateSetBufferMode));
}
catch (Exception e)
{
@@ -132,22 +132,28 @@ namespace OpenTK.OpenAL
}
[CLSCompliant(false)]
- public void _SetBufferMode(ref uint buffer, XRamStorage mode)
+ public void SetBufferMode(int n, ref uint buffer, XRamStorage mode)
{
switch (mode)
{
case XRamStorage.Acessible:
- EAXSetBufferMode(1, ref buffer, AL_STORAGE_ACCESSIBLE);
+ ImportedSetBufferMode(1, ref buffer, AL_STORAGE_ACCESSIBLE);
break;
case XRamStorage.Hardware:
- EAXSetBufferMode(1, ref buffer, AL_STORAGE_HARDWARE);
+ ImportedSetBufferMode(1, ref buffer, AL_STORAGE_HARDWARE);
break;
default:
- EAXSetBufferMode(1, ref buffer, AL_STORAGE_AUTOMATIC);
+ ImportedSetBufferMode(1, ref buffer, AL_STORAGE_AUTOMATIC);
break;
}
}
+ public XRamStorage GetBufferMode(ref uint buffer)
+ {
+ int t; // this is improper, find sample codes using it and figure out what 2nd param does.
+ return (XRamStorage)ImportedGetBufferMode(buffer, out t);
+ }
+
#endregion Public Methods
}
}
\ No newline at end of file