This commit is contained in:
chrisbrandtner 2008-01-17 19:02:37 +00:00
parent a906687581
commit 805f42408b
4 changed files with 63 additions and 64 deletions

View file

@ -14,98 +14,97 @@ namespace OpenTK.OpenAL
{
public partial class Efx
{
//Effect object functions.
#region Effect object functions.
/* Create Effect objects. */
// typedef void (__cdecl *LPALGENEFFECTS)( ALsizei n, ALuint* effects );
unsafe private delegate void DelegatealGenEffects(int n, [Out] uint* effects);
unsafe private delegate void Delegateal_GenEffects(int n, [Out] uint* effects);
/* Delete Effect objects. */
// typedef void (__cdecl *LPALDELETEEFFECTS)( ALsizei n, ALuint* effects );
unsafe private delegate void DelegatealDeleteEffects(int n, [In] uint* effects);
unsafe private delegate void Delegate_alDeleteEffects(int n, [In] uint* effects);
/* Verify a handle is a valid Effect. */
// typedef ALboolean (__cdecl *LPALISEFFECT)( ALuint eid );
private delegate AL.Bool DelegatealIsEffect(uint eid);
private delegate bool Delegate_alIsEffect(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);
private delegate void Delegate_alEffecti(uint eid, EfxEffecti param, int value);
/* Set a floating point parameter for an Effect object. */
// typedef void (__cdecl *LPALEFFECTF)( ALuint eid, ALenum param, ALfloat value);
private delegate void DelegateAlEffectf(uint eid, EfxEffectf param, float value);
private delegate void Delegate_alEffectf(uint eid, EfxEffectf param, float value);
/* Get an integer parameter for an Effect object. */
// typedef void (__cdecl *LPALGETEFFECTI)( ALuint eid, ALenum pname, ALint* value );
unsafe private delegate void Delegate_alGetEffecti(uint eid, EfxEffecti pname, [Out] int* value);
/* Get a floating point parameter for an Effect object. */
// typedef void (__cdecl *LPALGETEFFECTF)( ALuint eid, ALenum pname, ALfloat* value );
unsafe private delegate void Delegate_alGetEffectf(uint eid, EfxEffectf pname, [Out]float* value);
// Not used: typedef void (__cdecl *LPALEFFECTIV)( ALuint eid, ALenum param, ALint* values );
// Not used: typedef void (__cdecl *LPALEFFECTFV)( ALuint eid, ALenum param, ALfloat* values );
// Not used: typedef void (__cdecl *LPALGETEFFECTIV)( ALuint eid, ALenum pname, ALint* values );
// Not used: typedef void (__cdecl *LPALGETEFFECTFV)( ALuint eid, ALenum pname, ALfloat* values );
// Not used:
// typedef void (__cdecl *LPALEFFECTIV)( ALuint eid, ALenum param, ALint* values );
// typedef void (__cdecl *LPALEFFECTFV)( ALuint eid, ALenum param, ALfloat* values );
// typedef void (__cdecl *LPALGETEFFECTIV)( ALuint eid, ALenum pname, ALint* values );
// typedef void (__cdecl *LPALGETEFFECTFV)( ALuint eid, ALenum pname, ALfloat* values );
#endregion Effect object functions.
// Filter object functions
#region Filter object functions
/* Create Filter objects. */
// typedef void (__cdecl *LPALGENFILTERS)( ALsizei n, ALuint* filters );
unsafe private delegate void Delegate_alGenFilters(int n, [Out] uint* filters);
/* Delete Filter objects. */
// typedef void (__cdecl *LPALDELETEFILTERS)( ALsizei n, ALuint* filters );
unsafe private delegate void Delegate_alDeleteFilters(int n, [In] uint* filters);
/* Verify a handle is a valid Filter. */
// typedef ALboolean (__cdecl *LPALISFILTER)( ALuint fid );
private delegate bool Delegate_alIsFilter(uint fid);
/* Set an integer parameter for a Filter object. */
// typedef void (__cdecl *LPALFILTERI)( ALuint fid, ALenum param, ALint value );
// typedef void (__cdecl *LPALFILTERIV)( ALuint fid, ALenum param, ALint* values );
// typedef void (__cdecl *LPALFILTERI)( ALuint fid, ALenum param, ALint value );
private delegate void Delegate_alFilteri(uint fid, EfxFilteri param, int value);
/* Set a floating point parameter for an Filter object. */
// typedef void (__cdecl *LPALFILTERF)( ALuint fid, ALenum param, ALfloat value);
// typedef void (__cdecl *LPALFILTERFV)( ALuint fid, ALenum param, ALfloat* values );
private delegate void Delegate_alFilterf(uint fid, EfxFilterf param, float value);
/* Get an integer parameter for a Filter object. */
// typedef void (__cdecl *LPALGETFILTERI)( ALuint fid, ALenum pname, ALint* value );
// typedef void (__cdecl *LPALGETFILTERIV)( ALuint fid, ALenum pname, ALint* values );
unsafe private delegate void Delegate_alGetFilteri(uint fid, EfxFilteri pname, [Out] int* value);
/* Get a floating point parameter for a Filter object. */
// typedef void (__cdecl *LPALGETFILTERF)( ALuint fid, ALenum pname, ALfloat* value );
unsafe private delegate void Delegate_alGetFilterf(uint fid, EfxFilterf pname, [Out] float* value);
// Not used:
// typedef void (__cdecl *LPALFILTERIV)( ALuint fid, ALenum param, ALint* values );
// typedef void (__cdecl *LPALFILTERFV)( ALuint fid, ALenum param, ALfloat* values );
// typedef void (__cdecl *LPALGETFILTERIV)( ALuint fid, ALenum pname, ALint* values );
// typedef void (__cdecl *LPALGETFILTERFV)( ALuint fid, ALenum pname, ALfloat* values );
#endregion Filter object functions
// Auxiliary Slot object functions
#region Auxiliary Slot object functions
// typedef void (__cdecl *LPALGENAUXILIARYEFFECTSLOTS)( ALsizei n, ALuint* slots );
unsafe private delegate void Delegate_alGenAuxiliaryEffectSlots(int n, [Out] uint* slots);
/* Create Auxiliary Slot objects. */
// typedef void (__cdecl *LPALGENAUXILIARYEFFECTSLOTS)( ALsizei n, ALuint* slots );
/* Delete Auxiliary Slot objects. */
// typedef void (__cdecl *LPALDELETEAUXILIARYEFFECTSLOTS)( ALsizei n, ALuint* slots );
unsafe private delegate void Delegate_alDeleteAuxiliaryEffectSlots(int n, [In] uint* slots);
/* Verify a handle is a valid Auxiliary Slot. */
// typedef ALboolean (__cdecl *LPALISAUXILIARYEFFECTSLOT)( ALuint slot );
private delegate bool Delegate_alIsAuxiliaryEffectSlot(uint slot);
/* Set an integer parameter for a Auxiliary Slot object. */
// typedef void (__cdecl *LPALAUXILIARYEFFECTSLOTI)( ALuint asid, ALenum param, ALint value );
// typedef void (__cdecl *LPALAUXILIARYEFFECTSLOTIV)( ALuint asid, ALenum param, ALint* values );
private delegate void Delegate_alAuxiliaryEffectSloti(uint asid, EfxAuxiliaryi param, int value);
/* Set a floating point parameter for an Auxiliary Slot object. */
// typedef void (__cdecl *LPALAUXILIARYEFFECTSLOTF)( ALuint asid, ALenum param, ALfloat value );
// typedef void (__cdecl *LPALAUXILIARYEFFECTSLOTFV)( ALuint asid, ALenum param, ALfloat* values );
private delegate void Delegate_alAuxiliaryEffectSlotf(uint asid, EfxAuxiliaryf param, float value);
/* Get an integer parameter for a Auxiliary Slot object. */
// typedef void (__cdecl *LPALGETAUXILIARYEFFECTSLOTI)( ALuint asid, ALenum pname, ALint* value );
// typedef void (__cdecl *LPALGETAUXILIARYEFFECTSLOTIV)( ALuint asid, ALenum pname, ALint* values );
unsafe private delegate void Delegate_alGetAuxiliaryEffectSloti(uint asid, EfxAuxiliaryi pname, [Out] int* value);
/* Get a floating point parameter for a Auxiliary Slot object. */
// typedef void (__cdecl *LPALGETAUXILIARYEFFECTSLOTF)( ALuint asid, ALenum pname, ALfloat* value );
unsafe private delegate void Delegate_alGetAuxiliaryEffectSlotf(uint asid, EfxAuxiliaryf pname, [Out] float* value);
// Not used:
// typedef void (__cdecl *LPALAUXILIARYEFFECTSLOTIV)( ALuint asid, ALenum param, ALint* values );
// typedef void (__cdecl *LPALAUXILIARYEFFECTSLOTFV)( ALuint asid, ALenum param, ALfloat* values );
// typedef void (__cdecl *LPALGETAUXILIARYEFFECTSLOTIV)( ALuint asid, ALenum pname, ALint* values );
// typedef void (__cdecl *LPALGETAUXILIARYEFFECTSLOTFV)( ALuint asid, ALenum pname, ALfloat* values );
#endregion Auxiliary Slot object functions
}
}

View file

@ -44,7 +44,6 @@ namespace OpenTK.OpenAL
}
_EAXREVERBPROPERTIES EAXREVERBPROPERTIES; //, *LPEAXREVERBPROPERTIES;
public struct _EFXEAXREVERBPROPERTIES
{
float flDensity;
@ -73,7 +72,6 @@ namespace OpenTK.OpenAL
}
_EFXEAXREVERBPROPERTIES EFXEAXREVERBPROPERTIES;//, *LPEFXEAXREVERBPROPERTIES;
public struct _EAXOBSTRUCTIONPROPERTIES
{
int lObstruction;
@ -81,7 +79,6 @@ namespace OpenTK.OpenAL
}
_EAXOBSTRUCTIONPROPERTIES EAXOBSTRUCTIONPROPERTIES;//, *LPEAXOBSTRUCTIONPROPERTIES;
public struct _EAXOCCLUSIONPROPERTIES
{
int lOcclusion;
@ -91,7 +88,6 @@ namespace OpenTK.OpenAL
}
_EAXOCCLUSIONPROPERTIES EAXOCCLUSIONPROPERTIES;//, *LPEAXOCCLUSIONPROPERTIES;
public struct _EAXEXCLUSIONPROPERTIES
{
int lExclusion;
@ -99,7 +95,6 @@ namespace OpenTK.OpenAL
}
_EAXEXCLUSIONPROPERTIES EAXEXCLUSIONPROPERTIES;//, *LPEAXEXCLUSIONPROPERTIES;
public struct _EFXLOWPASSFILTER
{
float flGain;

View file

@ -359,18 +359,23 @@ namespace OpenTK.OpenAL
#region Auxiliary Effect Slot
public enum EfxAuxiliarySlot : int
public enum EfxAuxiliaryi : int
{
// Auxiliary Slot object definitions to be used with alAuxiliaryEffectSlot functions.
/// <summary>This property is used to attach an Effect object to the Auxiliary Effect Slot object. After the attachment, the Auxiliary Effect Slot object will contain the effect type and have the same effect parameters that were stored in the Effect object. Any Sources feeding the Auxiliary Effect Slot will immediate feed the new effect type and new effect parameters.</summary>
AL_EFFECTSLOT_EFFECT = 0x0001,
/// <summary>This property is used to specify an output level for the Auxiliary Effect Slot. Setting the gain to 0.0f mutes the output. Range [0.0f .. 1.0f] Default: 1.0f</summary>
AL_EFFECTSLOT_GAIN = 0x0002,
/// <summary>This property is used to enable or disable automatic send adjustments based on the physical positions of the sources and the listener. This property should be enabled when an application wishes to use a reverb effect to simulate the environment surrounding a listener or a collection of Sources. Range [False .. True] Default: True </summary>
AL_EFFECTSLOT_AUXILIARY_SEND_AUTO = 0x0003,
// Value to be used as an Auxiliary Slot ID to disable a source send..
AL_EFFECTSLOT_NULL = 0x0000,
// AL_EFFECTSLOT_NULL = 0x0000, // remove, seems not to belong here. it's a target, not a token
}
public enum EfxAuxiliaryf : int
{
/// <summary>This property is used to specify an output level for the Auxiliary Effect Slot. Setting the gain to 0.0f mutes the output. Range [0.0f .. 1.0f] Default: 1.0f</summary>
AL_EFFECTSLOT_GAIN = 0x0002,
}
#endregion Auxiliary Effect Slot
@ -401,12 +406,14 @@ namespace OpenTK.OpenAL
// Filter type
public enum EfxFilteri : int
{
AL_FILTER_FIRST_PARAMETER = 0x0000,
AL_FILTER_FIRST_PARAMETER = 0x0000, // deprecated?
AL_FILTER_LAST_PARAMETER = 0x8000, // deprecated?
/// <summary>Used with the enum EfxFilterType as Parameter.</summary>
AL_FILTER_TYPE = 0x8001,
}
// Filter type definitions to be used with AL_FILTER_TYPE.
///<summary>Filter type definitions to be used with AL_FILTER_TYPE.</summary>
public enum EfxFilterType : int
{
AL_FILTER_NULL = 0x0000, // Can also be used as a Filter Object ID

View file

@ -114,23 +114,20 @@ namespace OpenTK.OpenAL
/// <summary>Put an Open AL Buffer into X-RAM if memory is available, otherwise use host RAM. This is the default mode.
/// alGenBuffers(1, &uiBuffer);
/// eaxSetBufferMode(1, &uiBuffer, alGetEnumValue("AL_STORAGE_AUTOMATIC"));
/// alBufferData(...);
/// </summary>
/// alBufferData(...);</summary>
Automatic,
/// <summary>Force an Open AL Buffer into X-RAM (good for non-streaming buffers)
// alGenBuffers(1, &uiBuffer);
// eaxSetBufferMode(1, &uiBuffer, alGetEnumValue("AL_STORAGE_HARDWARE"));
// alBufferData(...);
/// </summary>
// alBufferData(...);</summary>
Hardware = 1,
/// <summary>Force an Open AL Buffer into 'accessible' (currently host) RAM (good for streaming buffers)
/// alGenBuffers(1, &uiBuffer);
/// eaxSetBufferMode(1, &uiBuffer, alGetEnumValue("AL_STORAGE_ACCESSIBLE"));
/// alBufferData(...);
/// </summary>
/// alBufferData(...);</summary>
Acessible = 2,
}
[CLSCompliant(false)]
public void SetBufferMode(int n, ref uint buffer, XRamStorage mode)
{
@ -148,6 +145,7 @@ namespace OpenTK.OpenAL
}
}
[CLSCompliant(false)]
public XRamStorage GetBufferMode(ref uint buffer)
{
int t; // this is improper, find sample codes using it and figure out what 2nd param does.