2008-01-16 18:43:52 +00:00
#region - - - OpenTK . OpenAL License - - -
/ * EfxFunctions . cs
* C headers : \ OpenAL 1.1 SDK \ include \ "efx.h" , "efx-creative.h" , "Efx-Util.h"
* Spec : Effects Extension Guide . pdf ( bundled with OpenAL SDK )
* Copyright ( c ) 2008 Christoph Brandtner and Stefanos Apostolopoulos
* See license . txt for license details
* http : //www.OpenTK.net */
#endregion
using System ;
2008-01-25 22:14:16 +00:00
using System.Diagnostics ;
2008-01-16 18:43:52 +00:00
using System.Runtime.InteropServices ;
2008-01-18 18:35:43 +00:00
using OpenTK.Math ;
2008-01-16 18:43:52 +00:00
namespace OpenTK.OpenAL
{
2008-01-25 22:14:16 +00:00
2008-01-18 13:32:51 +00:00
public partial class EfxExtension
2008-01-16 18:43:52 +00:00
{
2008-01-25 22:14:16 +00:00
#region Helpers
#region BindEffect
/// <summary>(Helper) Selects the Effect type used by this Effect handle.</summary>
/// <param name="eid">Effect id returned from a successful call to GenEffects.</param>
/// <param name="type">Effect type.</param>
2008-03-27 17:14:14 +00:00
[CLSCompliant( false )]
public void BindEffect ( uint eid , Enums . EfxEffectType type )
2008-01-25 22:14:16 +00:00
{
2008-03-27 17:14:14 +00:00
Imported_alEffecti ( eid , Enums . EfxEffecti . EffectType , ( int ) type ) ;
2008-01-25 22:14:16 +00:00
}
2008-02-11 10:11:58 +00:00
/// <summary>(Helper) Selects the Effect type used by this Effect handle.</summary>
/// <param name="eid">Effect id returned from a successful call to GenEffects.</param>
/// <param name="type">Effect type.</param>
[CLSCompliant( true )]
public void BindEffect ( int eid , Enums . EfxEffectType type )
{
2008-03-27 17:14:14 +00:00
Imported_alEffecti ( ( uint ) eid , Enums . EfxEffecti . EffectType , ( int ) type ) ;
2008-02-11 10:11:58 +00:00
}
2008-01-25 22:14:16 +00:00
#endregion BindEffect
#region BindFilterToSource
/// <summary>(Helper) reroutes the output of a Source through a Filter.</summary>
/// <param name="source">A valid Source handle.</param>
/// <param name="filter">A valid Filter handle.</param>
2008-03-27 17:14:14 +00:00
[CLSCompliant( false )]
public void BindFilterToSource ( uint source , uint filter )
2008-01-25 22:14:16 +00:00
{
2008-03-27 17:14:14 +00:00
AL . Source ( source , Enums . ALSourcei . EfxDirectFilter , ( int ) filter ) ;
2008-01-25 22:14:16 +00:00
}
2008-02-11 10:11:58 +00:00
/// <summary>(Helper) reroutes the output of a Source through a Filter.</summary>
/// <param name="source">A valid Source handle.</param>
/// <param name="filter">A valid Filter handle.</param>
[CLSCompliant( true )]
public void BindFilterToSource ( int source , int filter )
{
2008-03-27 17:14:14 +00:00
AL . Source ( ( uint ) source , Enums . ALSourcei . EfxDirectFilter , ( int ) filter ) ;
2008-02-11 10:11:58 +00:00
}
2008-01-25 22:14:16 +00:00
#endregion BindFilterToSource
#region BindEffectToAuxiliarySlot
/// <summary>(Helper) Attaches an Effect to an Auxiliary Effect Slot.</summary>
/// <param name="auxiliaryeffectslot">The slot handle to attach the Effect to.</param>
/// <param name="effect">The Effect handle that is being attached.</param>
2008-03-27 17:14:14 +00:00
[CLSCompliant( false )]
public void BindEffectToAuxiliarySlot ( uint auxiliaryeffectslot , uint effect )
2008-01-25 22:14:16 +00:00
{
2008-03-27 17:14:14 +00:00
AuxiliaryEffectSlot ( auxiliaryeffectslot , Enums . EfxAuxiliaryi . EffectslotEffect , ( int ) effect ) ;
2008-01-25 22:14:16 +00:00
}
2008-02-11 10:11:58 +00:00
/// <summary>(Helper) Attaches an Effect to an Auxiliary Effect Slot.</summary>
/// <param name="auxiliaryeffectslot">The slot handle to attach the Effect to.</param>
/// <param name="effect">The Effect handle that is being attached.</param>
[CLSCompliant( true )]
public void BindEffectToAuxiliarySlot ( int auxiliaryeffectslot , int effect )
{
2008-03-27 17:14:14 +00:00
AuxiliaryEffectSlot ( ( uint ) auxiliaryeffectslot , Enums . EfxAuxiliaryi . EffectslotEffect , ( int ) effect ) ;
2008-02-11 10:11:58 +00:00
}
2008-01-25 22:14:16 +00:00
#endregion BindEffectToAuxiliarySlot
#region BindSourceToAuxiliarySlot
/// <summary>(Helper) Reroutes a Source's output into an Auxiliary Effect Slot.</summary>
/// <param name="source">The Source handle who's output is forwarded.</param>
/// <param name="slot">The Auxiliary Effect Slot handle that receives input from the Source.</param>
/// <param name="slotnumber">Every Source has only a limited number of slots it can feed data to. The number must stay below AlcContextAttributes.EfxMaxAuxiliarySends</param>
/// <param name="filter">Filter handle to be attached between Source ouput and Auxiliary Slot input. Use 0 or EfxFilterType.FilterNull for no filter. </param>
2008-03-27 17:14:14 +00:00
[CLSCompliant( false )]
public void BindSourceToAuxiliarySlot ( uint source , uint slot , int slotnumber , uint filter )
2008-01-25 22:14:16 +00:00
{
2008-02-11 10:11:58 +00:00
AL . Source ( source , Enums . ALSource3i . EfxAuxiliarySendFilter , ( int ) slot , ( int ) slotnumber , ( int ) filter ) ;
}
/// <summary>(Helper) Reroutes a Source's output into an Auxiliary Effect Slot.</summary>
/// <param name="source">The Source handle who's output is forwarded.</param>
/// <param name="slot">The Auxiliary Effect Slot handle that receives input from the Source.</param>
/// <param name="slotnumber">Every Source has only a limited number of slots it can feed data to. The number must stay below AlcContextAttributes.EfxMaxAuxiliarySends</param>
/// <param name="filter">Filter handle to be attached between Source ouput and Auxiliary Slot input. Use 0 or EfxFilterType.FilterNull for no filter. </param>
[CLSCompliant( true )]
public void BindSourceToAuxiliarySlot ( int source , int slot , int slotnumber , int filter )
{
2008-03-27 17:14:14 +00:00
AL . Source ( ( uint ) source , Enums . ALSource3i . EfxAuxiliarySendFilter , ( int ) slot , ( int ) slotnumber , ( int ) filter ) ;
2008-01-25 22:14:16 +00:00
}
#endregion BindSourceToAuxiliarySlot
#endregion Helpers
2008-01-18 13:32:51 +00:00
#region Effect Object
#region alGenEffects
2008-01-16 18:43:52 +00:00
2008-01-20 19:29:42 +00:00
//[CLSCompliant(false)]
2008-03-27 17:14:14 +00:00
unsafe private delegate void Delegate_alGenEffects ( int n , [ Out ] uint * effects ) ;
2008-01-25 22:14:16 +00:00
// typedef void (__cdecl *LPALGENEFFECTS)( ALsizei n, ALuint* effects );
2008-01-18 13:32:51 +00:00
2008-01-20 19:00:03 +00:00
//[CLSCompliant(false)]
2008-01-18 13:32:51 +00:00
private Delegate_alGenEffects Imported_alGenEffects ;
2008-01-25 22:14:16 +00:00
/// <summary>The GenEffects function is used to create one or more Effect objects. An Effect object stores an effect type and a set of parameter values to control that Effect. In order to use an Effect it must be attached to an Auxiliary Effect Slot object</summary>
/// <remarks>After creation an Effect has no type (EfxEffectType.Null), so before it can be used to store a set of parameters, the application must specify what type of effect should be stored in the object, using Effect() with EfxEffecti.</remarks>
2008-01-18 17:24:39 +00:00
/// <param name="n">Number of Effects to be created.</param>
/// <param name="effects">Pointer addressing sufficient memory to store n Effect object identifiers.</param>
2008-03-27 17:14:14 +00:00
[CLSCompliant( false )]
public void GenEffects ( int n , out uint effects )
2008-01-18 13:32:51 +00:00
{
unsafe
{
2008-01-18 17:24:39 +00:00
fixed ( uint * ptr = & effects )
2008-01-18 13:32:51 +00:00
{
2008-03-27 17:14:14 +00:00
Imported_alGenEffects ( n , ptr ) ;
2008-01-18 17:24:39 +00:00
effects = * ptr ;
2008-01-18 13:32:51 +00:00
}
}
}
2008-02-11 10:11:58 +00:00
/// <summary>The GenEffects function is used to create one or more Effect objects. An Effect object stores an effect type and a set of parameter values to control that Effect. In order to use an Effect it must be attached to an Auxiliary Effect Slot object</summary>
/// <remarks>After creation an Effect has no type (EfxEffectType.Null), so before it can be used to store a set of parameters, the application must specify what type of effect should be stored in the object, using Effect() with EfxEffecti.</remarks>
/// <param name="n">Number of Effects to be created.</param>
/// <param name="effects">Pointer addressing sufficient memory to store n Effect object identifiers.</param>
[CLSCompliant( true )]
public void GenEffects ( int n , out int [ ] effects )
{
uint [ ] temp = new uint [ n ] ;
GenEffects ( n , out temp [ 0 ] ) ;
effects = new int [ n ] ;
2008-03-27 17:14:14 +00:00
for ( int i = 0 ; i < n ; i + + )
2008-02-11 10:11:58 +00:00
{
effects [ i ] = ( int ) temp [ i ] ;
}
}
2008-03-27 16:46:23 +00:00
/// <summary>The GenEffects function is used to create one or more Effect objects. An Effect object stores an effect type and a set of parameter values to control that Effect. In order to use an Effect it must be attached to an Auxiliary Effect Slot object</summary>
/// <remarks>After creation an Effect has no type (EfxEffectType.Null), so before it can be used to store a set of parameters, the application must specify what type of effect should be stored in the object, using Effect() with EfxEffecti.</remarks>
/// <param name="effects">Pointer addressing sufficient memory to store n Effect object identifiers.</param>
[CLSCompliant( true )]
public void GenEffects ( int [ ] effects )
{
uint [ ] temp = new uint [ effects . Length ] ;
GenEffects ( temp . Length , out temp [ 0 ] ) ;
for ( int i = 0 ; i < temp . Length ; i + + )
{
effects [ i ] = ( int ) temp [ i ] ;
}
}
2008-03-27 17:14:14 +00:00
/// <summary>The GenEffects function is used to create one or more Effect objects. An Effect object stores an effect type and a set of parameter values to control that Effect. In order to use an Effect it must be attached to an Auxiliary Effect Slot object</summary>
/// <remarks>After creation an Effect has no type (EfxEffectType.Null), so before it can be used to store a set of parameters, the application must specify what type of effect should be stored in the object, using Effect() with EfxEffecti.</remarks>
/// <param name="n">Number of Effects to be created.</param>
/// <returns>Pointer addressing sufficient memory to store n Effect object identifiers.</returns>
[CLSCompliant( true )]
public int [ ] GenEffects ( int n )
{
uint [ ] temp = new uint [ n ] ;
GenEffects ( temp . Length , out temp [ 0 ] ) ;
int [ ] effects = new int [ n ] ;
for ( int i = 0 ; i < temp . Length ; i + + )
{
effects [ i ] = ( int ) temp [ i ] ;
}
return effects ;
}
2008-01-18 13:32:51 +00:00
/// <summary>This function generates only one Effect.</summary>
2008-01-18 17:24:39 +00:00
/// <param name="effect">Storage UInt32 for the new effect name/handle.</param>
2008-02-11 10:11:58 +00:00
[CLSCompliant( false )]
2008-01-18 17:24:39 +00:00
public void GenEffects ( out uint effect )
2008-01-18 13:32:51 +00:00
{
unsafe
{
2008-01-18 17:24:39 +00:00
fixed ( uint * ptr = & effect )
2008-01-18 13:32:51 +00:00
{
2008-03-27 17:14:14 +00:00
Imported_alGenEffects ( 1 , ptr ) ;
2008-01-18 13:32:51 +00:00
}
}
}
2008-02-11 10:11:58 +00:00
/// <summary>This function generates only one Effect.</summary>
/// <param name="effect">Storage UInt32 for the new effect name/handle.</param>
[CLSCompliant( true )]
public void GenEffects ( out int effect )
{
uint temp ;
GenEffects ( out temp ) ;
effect = ( int ) temp ;
}
2008-03-27 16:46:23 +00:00
/// <summary>This function generates only one Effect.</summary>
2008-03-27 17:14:14 +00:00
/// <returns>Storage UInt32 for the new effect name/handle.</returns>
2008-03-27 16:46:23 +00:00
[CLSCompliant( true )]
2008-03-27 17:14:14 +00:00
public int GenEffects ( )
2008-03-27 16:46:23 +00:00
{
uint temp ;
GenEffects ( out temp ) ;
return ( int ) temp ;
}
2008-01-18 13:32:51 +00:00
#endregion alGenEffects
#region alDeleteEffects
2008-01-16 18:43:52 +00:00
2008-01-20 19:29:42 +00:00
//[CLSCompliant(false)]
2008-03-27 17:14:14 +00:00
unsafe private delegate void Delegate_alDeleteEffects ( int n , [ In ] uint * effects ) ;
2008-01-25 22:14:16 +00:00
// typedef void (__cdecl *LPALDELETEEFFECTS)( ALsizei n, ALuint* effects );
2008-01-18 13:32:51 +00:00
2008-01-20 19:00:03 +00:00
//[CLSCompliant(false)]
2008-01-18 13:32:51 +00:00
private Delegate_alDeleteEffects Imported_alDeleteEffects ;
2008-01-25 22:14:16 +00:00
/// <summary>The DeleteEffects function is used to delete and free resources for Effect objects previously created with GenEffects.</summary>
2008-01-18 17:24:39 +00:00
/// <param name="n">Number of Effects to be deleted.</param>
/// <param name="effects">Pointer to n Effect object identifiers.</param>
2008-03-27 17:14:14 +00:00
[CLSCompliant( false )]
public void DeleteEffects ( int n , ref uint [ ] effects )
2008-01-18 13:32:51 +00:00
{
unsafe
{
2008-01-18 17:24:39 +00:00
fixed ( uint * ptr = effects )
2008-01-18 13:32:51 +00:00
{
2008-03-27 17:14:14 +00:00
Imported_alDeleteEffects ( n , ptr ) ;
2008-01-18 13:32:51 +00:00
}
}
}
2008-03-27 17:14:14 +00:00
/// <summary>The DeleteEffects function is used to delete and free resources for Effect objects previously created with GenEffects.</summary>
2008-02-11 10:11:58 +00:00
/// <param name="n">Number of Effects to be deleted.</param>
/// <param name="effects">Pointer to n Effect object identifiers.</param>
[CLSCompliant( true )]
public void DeleteEffects ( int n , ref int [ ] effects )
{
uint [ ] temp = new uint [ n ] ;
2008-03-27 17:14:14 +00:00
for ( int i = 0 ; i < n ; i + + )
2008-02-11 10:11:58 +00:00
{
temp [ i ] = ( uint ) effects [ i ] ;
}
DeleteEffects ( n , ref temp ) ;
}
2008-03-27 16:46:23 +00:00
/// <summary>The DeleteEffects function is used to delete and free resources for Effect objects previously created with GenEffects.</summary>
/// <param name="effects">Pointer to n Effect object identifiers.</param>
[CLSCompliant( true )]
public void DeleteEffects ( int [ ] effects )
{
uint [ ] temp = new uint [ effects . Length ] ;
for ( int i = 0 ; i < temp . Length ; i + + )
{
temp [ i ] = ( uint ) effects [ i ] ;
}
DeleteEffects ( temp . Length , ref temp ) ;
}
2008-01-18 13:32:51 +00:00
/// <summary>This function deletes one Effect only.</summary>
2008-01-18 17:24:39 +00:00
/// <param name="effect">Pointer to an effect name/handle identifying the Effect Object to be deleted.</param>
2008-03-27 17:14:14 +00:00
[CLSCompliant( false )]
2008-01-18 17:24:39 +00:00
public void DeleteEffects ( ref uint effect )
2008-01-18 13:32:51 +00:00
{
unsafe
{
2008-01-18 17:24:39 +00:00
fixed ( uint * ptr = & effect )
2008-01-18 13:32:51 +00:00
{
2008-03-27 17:14:14 +00:00
Imported_alDeleteEffects ( 1 , ptr ) ;
2008-01-18 13:32:51 +00:00
}
}
}
2008-03-27 17:14:14 +00:00
/// <summary>This function deletes one Effect only.</summary>
2008-02-11 10:11:58 +00:00
/// <param name="effect">Pointer to an effect name/handle identifying the Effect Object to be deleted.</param>
2008-03-27 17:14:14 +00:00
[CLSCompliant( true )]
2008-02-11 10:11:58 +00:00
public void DeleteEffects ( ref int effect )
{
uint temp = ( uint ) effect ;
DeleteEffects ( ref temp ) ;
}
2008-03-27 16:46:23 +00:00
/// <summary>This function deletes one Effect only.</summary>
/// <param name="effect">Pointer to an effect name/handle identifying the Effect Object to be deleted.</param>
[CLSCompliant( true )]
public void DeleteEffects ( int effect )
{
uint temp = ( uint ) effect ;
DeleteEffects ( ref temp ) ;
}
2008-01-18 13:32:51 +00:00
#endregion alDeleteEffects
#region alIsEffect
2008-01-16 18:43:52 +00:00
2008-01-20 19:00:03 +00:00
//[CLSCompliant(false)]
2008-01-18 17:24:39 +00:00
private delegate bool Delegate_alIsEffect ( uint eid ) ;
2008-01-25 22:14:16 +00:00
// typedef ALboolean (__cdecl *LPALISEFFECT)( ALuint eid );
2008-01-18 13:32:51 +00:00
2008-01-20 19:00:03 +00:00
//[CLSCompliant(false)]
2008-01-18 17:24:39 +00:00
private Delegate_alIsEffect Imported_alIsEffect ;
2008-01-25 22:14:16 +00:00
/// <summary>The IsEffect function is used to determine if an object identifier is a valid Effect object.</summary>
2008-01-18 17:24:39 +00:00
/// <param name="eid">Effect identifier to validate.</param>
/// <returns>True if the identifier is a valid Effect, False otherwise.</returns>
2008-03-27 17:14:14 +00:00
[CLSCompliant( false )]
2008-01-18 17:24:39 +00:00
public bool IsEffect ( uint eid )
{
2008-03-27 17:14:14 +00:00
return Imported_alIsEffect ( eid ) ;
2008-01-18 17:24:39 +00:00
}
2008-01-18 13:32:51 +00:00
2008-03-27 17:14:14 +00:00
/// <summary>The IsEffect function is used to determine if an object identifier is a valid Effect object.</summary>
2008-02-11 10:11:58 +00:00
/// <param name="eid">Effect identifier to validate.</param>
/// <returns>True if the identifier is a valid Effect, False otherwise.</returns>
[CLSCompliant( true )]
public bool IsEffect ( int eid )
{
return Imported_alIsEffect ( ( uint ) eid ) ;
}
2008-01-18 13:32:51 +00:00
#endregion alIsEffect
#region alEffecti
2008-01-16 18:43:52 +00:00
2008-01-20 19:00:03 +00:00
//[CLSCompliant(false)]
2008-03-27 17:14:14 +00:00
private delegate void Delegate_alEffecti ( uint eid , Enums . EfxEffecti param , int value ) ;
2008-01-25 22:14:16 +00:00
// typedef void (__cdecl *LPALEFFECTI)( ALuint eid, ALenum param, ALint value);
2008-01-18 13:32:51 +00:00
2008-01-20 19:00:03 +00:00
//[CLSCompliant(false)]
2008-01-18 17:24:39 +00:00
private Delegate_alEffecti Imported_alEffecti ;
2008-01-18 13:32:51 +00:00
2008-01-18 17:24:39 +00:00
/// <summary>This function is used to set integer properties on Effect objects.</summary>
/// <param name="eid">Effect object identifier.</param>
/// <param name="param">Effect property to set.</param>
/// <param name="value">Integer value.</param>
2008-03-27 17:14:14 +00:00
[CLSCompliant( false )]
public void Effect ( uint eid , Enums . EfxEffecti param , int value )
2008-01-18 17:24:39 +00:00
{
2008-03-27 17:14:14 +00:00
Imported_alEffecti ( eid , param , value ) ;
2008-01-18 17:24:39 +00:00
}
2008-02-11 10:11:58 +00:00
/// <summary>This function is used to set integer properties on Effect objects.</summary>
/// <param name="eid">Effect object identifier.</param>
/// <param name="param">Effect property to set.</param>
/// <param name="value">Integer value.</param>
[CLSCompliant( true )]
public void Effect ( int eid , Enums . EfxEffecti param , int value )
{
2008-03-27 17:14:14 +00:00
Imported_alEffecti ( ( uint ) eid , param , value ) ;
2008-02-11 10:11:58 +00:00
}
2008-01-18 13:32:51 +00:00
#endregion alEffecti
#region alEffectf
2008-01-17 17:05:19 +00:00
2008-01-20 19:00:03 +00:00
//[CLSCompliant(false)]
2008-03-27 17:14:14 +00:00
private delegate void Delegate_alEffectf ( uint eid , Enums . EfxEffectf param , float value ) ;
2008-01-25 22:14:16 +00:00
// typedef void (__cdecl *LPALEFFECTF)( ALuint eid, ALenum param, ALfloat value);
2008-01-18 17:24:39 +00:00
2008-01-20 19:00:03 +00:00
//[CLSCompliant(false)]
2008-01-18 17:24:39 +00:00
private Delegate_alEffectf Imported_alEffectf ;
2008-01-18 13:32:51 +00:00
2008-01-18 17:24:39 +00:00
/// <summary>This function is used to set floating point properties on Effect objects.</summary>
/// <param name="eid">Effect object identifier.</param>
/// <param name="param">Effect property to set.</param>
/// <param name="value">Floating point value.</param>
2008-03-27 17:14:14 +00:00
[CLSCompliant( false )]
public void Effect ( uint eid , Enums . EfxEffectf param , float value )
2008-01-18 17:24:39 +00:00
{
2008-03-27 17:14:14 +00:00
Imported_alEffectf ( eid , param , value ) ;
2008-01-18 17:24:39 +00:00
}
2008-01-18 13:32:51 +00:00
2008-02-11 10:11:58 +00:00
/// <summary>This function is used to set floating point properties on Effect objects.</summary>
/// <param name="eid">Effect object identifier.</param>
/// <param name="param">Effect property to set.</param>
/// <param name="value">Floating point value.</param>
[CLSCompliant( true )]
public void Effect ( int eid , Enums . EfxEffectf param , float value )
{
2008-03-27 17:14:14 +00:00
Imported_alEffectf ( ( uint ) eid , param , value ) ;
2008-02-11 10:11:58 +00:00
}
2008-01-18 13:32:51 +00:00
#endregion alEffectf
2008-01-18 18:35:43 +00:00
#region alEffectfv
2008-01-20 19:29:42 +00:00
//[CLSCompliant(false)]
2008-03-27 17:14:14 +00:00
unsafe private delegate void Delegate_alEffectfv ( uint eid , Enums . EfxEffect3f param , [ In ] float * values ) ;
2008-01-25 22:14:16 +00:00
// typedef void (__cdecl *LPALEFFECTFV)( ALuint eid, ALenum param, ALfloat* values );
2008-01-18 18:35:43 +00:00
2008-01-20 19:29:42 +00:00
//[CLSCompliant(false)]
2008-01-18 18:35:43 +00:00
private Delegate_alEffectfv Imported_alEffectfv ;
2008-02-11 10:11:58 +00:00
/// <summary>This function is used to set 3 floating point properties on Effect objects.</summary>
/// <param name="eid">Effect object identifier.</param>
/// <param name="param">Effect property to set.</param>
/// <param name="values">Pointer to Math.Vector3.</param>
2008-03-27 17:14:14 +00:00
[CLSCompliant( false )]
public void Effect ( uint eid , Enums . EfxEffect3f param , ref Vector3 values )
2008-01-18 18:35:43 +00:00
{
unsafe
{
fixed ( float * ptr = & values . X )
{
2008-03-27 17:14:14 +00:00
Imported_alEffectfv ( eid , param , ptr ) ;
2008-01-18 18:35:43 +00:00
}
}
}
2008-02-11 10:11:58 +00:00
/// <summary>This function is used to set 3 floating point properties on Effect objects.</summary>
/// <param name="eid">Effect object identifier.</param>
/// <param name="param">Effect property to set.</param>
/// <param name="values">Pointer to Math.Vector3.</param>
[CLSCompliant( true )]
public void Effect ( int eid , Enums . EfxEffect3f param , ref Vector3 values )
{
Effect ( ( uint ) eid , param , ref values ) ;
}
2008-01-18 18:35:43 +00:00
#endregion alEffectfv
2008-01-18 13:32:51 +00:00
#region alGetEffecti
2008-01-16 18:43:52 +00:00
2008-01-20 19:00:03 +00:00
//[CLSCompliant(false)]
2008-03-27 17:14:14 +00:00
unsafe private delegate void Delegate_alGetEffecti ( uint eid , Enums . EfxEffecti pname , [ Out ] int * value ) ;
2008-01-25 22:14:16 +00:00
// typedef void (__cdecl *LPALGETEFFECTI)( ALuint eid, ALenum pname, ALint* value );
2008-01-18 13:32:51 +00:00
2008-01-20 19:00:03 +00:00
//[CLSCompliant(false)]
2008-01-18 13:32:51 +00:00
private Delegate_alGetEffecti Imported_alGetEffecti ;
2008-01-18 17:24:39 +00:00
/// <summary>This function is used to retrieve integer properties from Effect objects.</summary>
/// <param name="eid">Effect object identifier.</param>
/// <param name="pname">Effect property to retrieve.</param>
/// <param name="value">Address where integer value will be stored.</param>
2008-03-27 17:14:14 +00:00
[CLSCompliant( false )]
public void GetEffect ( uint eid , Enums . EfxEffecti pname , out int value )
2008-01-18 13:32:51 +00:00
{
unsafe
{
fixed ( int * ptr = & value )
{
2008-03-27 17:14:14 +00:00
Imported_alGetEffecti ( eid , pname , ptr ) ;
2008-01-18 13:32:51 +00:00
}
}
}
2008-02-11 10:11:58 +00:00
/// <summary>This function is used to retrieve integer properties from Effect objects.</summary>
/// <param name="eid">Effect object identifier.</param>
/// <param name="pname">Effect property to retrieve.</param>
/// <param name="value">Address where integer value will be stored.</param>
[CLSCompliant( true )]
public void GetEffect ( int eid , Enums . EfxEffecti pname , out int value )
{
2008-03-27 17:14:14 +00:00
GetEffect ( ( uint ) eid , pname , out value ) ;
2008-02-11 10:11:58 +00:00
}
2008-01-18 13:32:51 +00:00
#endregion alGetEffecti
#region alGetEffectf
2008-01-17 17:05:19 +00:00
2008-01-20 19:00:03 +00:00
//[CLSCompliant(false)]
2008-03-27 17:14:14 +00:00
unsafe private delegate void Delegate_alGetEffectf ( uint eid , Enums . EfxEffectf pname , [ Out ] float * value ) ;
2008-01-25 22:14:16 +00:00
// typedef void (__cdecl *LPALGETEFFECTF)( ALuint eid, ALenum pname, ALfloat* value );
2008-01-18 13:32:51 +00:00
2008-01-20 19:00:03 +00:00
//[CLSCompliant(false)]
2008-01-18 13:32:51 +00:00
private Delegate_alGetEffectf Imported_alGetEffectf ;
2008-01-18 17:24:39 +00:00
/// <summary>This function is used to retrieve floating point properties from Effect objects.</summary>
/// <param name="eid">Effect object identifier.</param>
/// <param name="pname">Effect property to retrieve.</param>
/// <param name="value">Address where floating point value will be stored.</param>
2008-03-27 17:14:14 +00:00
[CLSCompliant( false )]
public void GetEffect ( uint eid , Enums . EfxEffectf pname , out float value )
2008-01-18 13:32:51 +00:00
{
unsafe
{
fixed ( float * ptr = & value )
{
2008-03-27 17:14:14 +00:00
Imported_alGetEffectf ( eid , pname , ptr ) ;
2008-01-18 13:32:51 +00:00
}
}
}
2008-02-11 10:11:58 +00:00
/// <summary>This function is used to retrieve floating point properties from Effect objects.</summary>
/// <param name="eid">Effect object identifier.</param>
/// <param name="pname">Effect property to retrieve.</param>
/// <param name="value">Address where floating point value will be stored.</param>
[CLSCompliant( true )]
public void GetEffect ( int eid , Enums . EfxEffectf pname , out float value )
{
GetEffect ( ( uint ) eid , pname , out value ) ;
}
2008-01-18 13:32:51 +00:00
#endregion alGetEffectf
2008-01-17 17:05:19 +00:00
2008-01-18 18:35:43 +00:00
#region alGetEffectfv
2008-01-25 22:14:16 +00:00
2008-01-20 19:00:03 +00:00
//[CLSCompliant(false)]
2008-03-27 17:14:14 +00:00
unsafe private delegate void Delegate_alGetEffectfv ( uint eid , Enums . EfxEffect3f param , [ Out ] float * values ) ;
2008-01-18 18:35:43 +00:00
// typedef void (__cdecl *LPALGETEFFECTFV)( ALuint eid, ALenum pname, ALfloat* values );
2008-01-20 19:00:03 +00:00
//[CLSCompliant(false)]
2008-01-18 18:35:43 +00:00
private Delegate_alGetEffectfv Imported_alGetEffectfv ;
2008-02-11 10:11:58 +00:00
/// <summary>This function is used to retrieve 3 floating point properties from Effect objects.</summary>
/// <param name="eid">Effect object identifier.</param>
/// <param name="pname">Effect property to retrieve.</param>
/// <param name="value">A Math.Vector3 to hold the values.</param>
2008-03-27 17:14:14 +00:00
[CLSCompliant( false )]
public void GetEffect ( uint eid , Enums . EfxEffect3f param , out Vector3 values )
2008-01-18 18:35:43 +00:00
{
unsafe
{
fixed ( float * ptr = & values . X )
{
2008-03-27 17:14:14 +00:00
Imported_alGetEffectfv ( eid , param , ptr ) ;
2008-01-18 18:35:43 +00:00
values . X = ptr [ 0 ] ;
values . Y = ptr [ 1 ] ;
values . Z = ptr [ 2 ] ;
}
}
}
2008-02-11 10:11:58 +00:00
/// <summary>This function is used to retrieve 3 floating point properties from Effect objects.</summary>
/// <param name="eid">Effect object identifier.</param>
/// <param name="pname">Effect property to retrieve.</param>
/// <param name="value">A Math.Vector3 to hold the values.</param>
[CLSCompliant( true )]
public void GetEffect ( int eid , Enums . EfxEffect3f param , out Vector3 values )
{
GetEffect ( ( uint ) eid , param , out values ) ;
}
2008-01-18 18:35:43 +00:00
#endregion alGetEffectfv
2008-01-17 19:02:37 +00:00
// Not used:
// typedef void (__cdecl *LPALEFFECTIV)( ALuint eid, ALenum param, ALint* values );
// typedef void (__cdecl *LPALGETEFFECTIV)( ALuint eid, ALenum pname, ALint* values );
2008-01-16 18:43:52 +00:00
2008-01-18 13:32:51 +00:00
#endregion Effect Object
#region Filter Object
2008-01-16 18:43:52 +00:00
2008-01-18 15:50:58 +00:00
#region alGenFilters
2008-01-17 17:05:19 +00:00
2008-01-20 19:00:03 +00:00
//[CLSCompliant(false)]
2008-03-27 17:14:14 +00:00
unsafe private delegate void Delegate_alGenFilters ( int n , [ Out ] uint * filters ) ;
2008-01-25 22:14:16 +00:00
// typedef void (__cdecl *LPALGENFILTERS)( ALsizei n, ALuint* filters );
2008-01-16 18:43:52 +00:00
2008-01-20 19:00:03 +00:00
//[CLSCompliant(false)]
2008-01-18 15:50:58 +00:00
private Delegate_alGenFilters Imported_alGenFilters ;
2008-01-25 22:14:16 +00:00
/// <summary>The GenFilters function is used to create one or more Filter objects. A Filter object stores a filter type and a set of parameter values to control that Filter. Filter objects can be attached to Sources as Direct Filters or Auxiliary Send Filters.</summary>
/// <remarks>After creation a Filter has no type (EfxFilterType.Null), so before it can be used to store a set of parameters, the application must specify what type of filter should be stored in the object, using Filter() with EfxFilteri.</remarks>
2008-01-18 17:24:39 +00:00
/// <param name="n">Number of Filters to be created.</param>
/// <param name="filters">Pointer addressing sufficient memory to store n Filter object identifiers.</param>
2008-03-27 17:14:14 +00:00
[CLSCompliant( false )]
public void GenFilters ( int n , out uint filters )
2008-01-18 15:50:58 +00:00
{
unsafe
{
fixed ( uint * ptr = & filters )
{
2008-03-27 17:14:14 +00:00
Imported_alGenFilters ( n , ptr ) ;
2008-01-18 15:50:58 +00:00
filters = * ptr ;
}
}
}
2008-02-11 10:11:58 +00:00
/// <summary>The GenFilters function is used to create one or more Filter objects. A Filter object stores a filter type and a set of parameter values to control that Filter. Filter objects can be attached to Sources as Direct Filters or Auxiliary Send Filters.</summary>
/// <remarks>After creation a Filter has no type (EfxFilterType.Null), so before it can be used to store a set of parameters, the application must specify what type of filter should be stored in the object, using Filter() with EfxFilteri.</remarks>
/// <param name="n">Number of Filters to be created.</param>
/// <param name="filters">Pointer addressing sufficient memory to store n Filter object identifiers.</param>
[CLSCompliant( true )]
public void GenFilters ( int n , out int [ ] filters )
{
uint [ ] temp = new uint [ n ] ;
GenFilters ( n , out temp [ 0 ] ) ;
filters = new int [ n ] ;
2008-03-27 17:14:14 +00:00
for ( int i = 0 ; i < n ; i + + )
2008-02-11 10:11:58 +00:00
{
filters [ i ] = ( int ) temp [ i ] ;
}
}
2008-03-27 16:46:23 +00:00
/// <summary>The GenFilters function is used to create one or more Filter objects. A Filter object stores a filter type and a set of parameter values to control that Filter. Filter objects can be attached to Sources as Direct Filters or Auxiliary Send Filters.</summary>
/// <remarks>After creation a Filter has no type (EfxFilterType.Null), so before it can be used to store a set of parameters, the application must specify what type of filter should be stored in the object, using Filter() with EfxFilteri.</remarks>
/// <param name="filters">Pointer addressing sufficient memory to store n Filter object identifiers.</param>
[CLSCompliant( true )]
public void GenFilters ( int [ ] filters )
{
uint [ ] temp = new uint [ filters . Length ] ;
GenFilters ( temp . Length , out temp [ 0 ] ) ;
for ( int i = 0 ; i < temp . Length ; i + + )
{
filters [ i ] = ( int ) temp [ i ] ;
}
}
2008-03-27 17:14:14 +00:00
/// <summary>The GenFilters function is used to create one or more Filter objects. A Filter object stores a filter type and a set of parameter values to control that Filter. Filter objects can be attached to Sources as Direct Filters or Auxiliary Send Filters.</summary>
/// <remarks>After creation a Filter has no type (EfxFilterType.Null), so before it can be used to store a set of parameters, the application must specify what type of filter should be stored in the object, using Filter() with EfxFilteri.</remarks>
/// <param name="n">Number of Filters to be created.</param>
/// <returns>Pointer addressing sufficient memory to store n Filter object identifiers.</returns>
[CLSCompliant( true )]
public int [ ] GenFilters ( int n )
{
uint [ ] temp = new uint [ n ] ;
GenFilters ( temp . Length , out temp [ 0 ] ) ;
int [ ] filters = new int [ n ] ;
for ( int i = 0 ; i < temp . Length ; i + + )
{
filters [ i ] = ( int ) temp [ i ] ;
}
return filters ;
}
2008-01-18 15:50:58 +00:00
/// <summary>This function generates only one Filter.</summary>
2008-01-18 17:24:39 +00:00
/// <param name="filter">Storage UInt32 for the new filter name/handle.</param>
2008-02-11 10:11:58 +00:00
[CLSCompliant( false )]
2008-01-18 15:50:58 +00:00
public void GenFilters ( out uint filter )
{
unsafe
{
fixed ( uint * ptr = & filter )
{
2008-03-27 17:14:14 +00:00
Imported_alGenFilters ( 1 , ptr ) ;
2008-01-18 15:50:58 +00:00
}
}
}
2008-02-11 10:11:58 +00:00
/// <summary>This function generates only one Filter.</summary>
/// <param name="filter">Storage UInt32 for the new filter name/handle.</param>
[CLSCompliant( true )]
public void GenFilters ( out int filter )
{
uint temp ;
GenFilters ( out temp ) ;
filter = ( int ) temp ;
}
2008-03-27 16:46:23 +00:00
/// <summary>This function generates only one Filter.</summary>
2008-03-27 17:14:14 +00:00
/// <returns>Storage UInt32 for the new filter name/handle.</returns>
2008-03-27 16:46:23 +00:00
[CLSCompliant( true )]
public int GenFilters ( )
{
uint temp ;
GenFilters ( out temp ) ;
return ( int ) temp ;
}
2008-01-18 15:50:58 +00:00
#endregion alGenFilters
#region alDeleteFilters
2008-01-20 19:00:03 +00:00
//[CLSCompliant(false)]
2008-03-27 17:14:14 +00:00
unsafe private delegate void Delegate_alDeleteFilters ( int n , [ In ] uint * filters ) ;
2008-01-25 22:14:16 +00:00
// typedef void (__cdecl *LPALDELETEFILTERS)( ALsizei n, ALuint* filters );
2008-01-16 18:43:52 +00:00
2008-01-20 19:00:03 +00:00
//[CLSCompliant(false)]
2008-01-18 15:50:58 +00:00
private Delegate_alDeleteFilters Imported_alDeleteFilters ;
2008-01-25 22:14:16 +00:00
/// <summary>The DeleteFilters function is used to delete and free resources for Filter objects previously created with GenFilters.</summary>
2008-01-18 17:24:39 +00:00
/// <param name="n">Number of Filters to be deleted.</param>
/// <param name="filters">Pointer to n Filter object identifiers.</param>
2008-03-27 17:14:14 +00:00
[CLSCompliant( false )]
public void DeleteFilters ( int n , ref uint [ ] filters )
2008-01-18 15:50:58 +00:00
{
unsafe
{
fixed ( uint * ptr = filters )
{
2008-03-27 17:14:14 +00:00
Imported_alDeleteFilters ( n , ptr ) ;
2008-01-18 15:50:58 +00:00
}
}
}
2008-02-11 10:11:58 +00:00
/// <summary>The DeleteFilters function is used to delete and free resources for Filter objects previously created with GenFilters.</summary>
/// <param name="n">Number of Filters to be deleted.</param>
/// <param name="filters">Pointer to n Filter object identifiers.</param>
[CLSCompliant( true )]
public void DeleteFilters ( int n , ref int [ ] filters )
{
uint [ ] temp = new uint [ n ] ;
2008-03-27 17:14:14 +00:00
for ( int i = 0 ; i < n ; i + + )
2008-02-11 10:11:58 +00:00
{
temp [ i ] = ( uint ) filters [ i ] ;
}
DeleteFilters ( n , ref temp ) ;
}
2008-03-27 16:46:23 +00:00
/// <summary>The DeleteFilters function is used to delete and free resources for Filter objects previously created with GenFilters.</summary>
/// <param name="filters">Pointer to n Filter object identifiers.</param>
[CLSCompliant( true )]
public void DeleteFilters ( int [ ] filters )
{
uint [ ] temp = new uint [ filters . Length ] ;
for ( int i = 0 ; i < temp . Length ; i + + )
{
temp [ i ] = ( uint ) filters [ i ] ;
}
DeleteFilters ( temp . Length , ref temp ) ;
}
2008-01-18 15:50:58 +00:00
/// <summary>This function deletes one Filter only.</summary>
2008-01-18 17:24:39 +00:00
/// <param name="filter">Pointer to an filter name/handle identifying the Filter Object to be deleted.</param>
2008-03-27 17:14:14 +00:00
[CLSCompliant( false )]
2008-01-18 15:50:58 +00:00
public void DeleteFilters ( ref uint filter )
{
unsafe
{
fixed ( uint * ptr = & filter )
{
2008-03-27 17:14:14 +00:00
Imported_alDeleteFilters ( 1 , ptr ) ;
2008-01-18 15:50:58 +00:00
}
}
}
2008-02-11 10:11:58 +00:00
/// <summary>This function deletes one Filter only.</summary>
/// <param name="filter">Pointer to an filter name/handle identifying the Filter Object to be deleted.</param>
[CLSCompliant( true )]
public void DeleteFilters ( ref int filter )
{
uint temp = ( uint ) filter ;
DeleteFilters ( ref temp ) ;
}
2008-03-27 16:46:23 +00:00
/// <summary>This function deletes one Filter only.</summary>
/// <param name="filter">Pointer to an filter name/handle identifying the Filter Object to be deleted.</param>
[CLSCompliant( true )]
public void DeleteFilters ( int filter )
{
uint temp = ( uint ) filter ;
DeleteFilters ( ref temp ) ;
}
2008-01-18 15:50:58 +00:00
#endregion alDeleteFilters
#region alIsFilter
2008-01-20 19:00:03 +00:00
//[CLSCompliant(false)]
2008-01-18 17:24:39 +00:00
private delegate bool Delegate_alIsFilter ( uint fid ) ;
2008-01-25 22:14:16 +00:00
// typedef ALboolean (__cdecl *LPALISFILTER)( ALuint fid );
2008-01-16 18:43:52 +00:00
2008-01-20 19:00:03 +00:00
//[CLSCompliant(false)]
2008-01-18 17:24:39 +00:00
private Delegate_alIsFilter Imported_alIsFilter ;
2008-01-25 22:14:16 +00:00
/// <summary>The IsFilter function is used to determine if an object identifier is a valid Filter object.</summary>
2008-01-18 17:24:39 +00:00
/// <param name="fid">Effect identifier to validate.</param>
/// <returns>True if the identifier is a valid Filter, False otherwise.</returns>
2008-03-27 17:14:14 +00:00
[CLSCompliant( false )]
2008-01-18 17:24:39 +00:00
public bool IsFilter ( uint fid )
{
2008-03-27 17:14:14 +00:00
return Imported_alIsFilter ( fid ) ;
2008-01-18 17:24:39 +00:00
}
2008-01-18 15:50:58 +00:00
2008-02-11 10:11:58 +00:00
/// <summary>The IsFilter function is used to determine if an object identifier is a valid Filter object.</summary>
/// <param name="fid">Effect identifier to validate.</param>
/// <returns>True if the identifier is a valid Filter, False otherwise.</returns>
[CLSCompliant( true )]
public bool IsFilter ( int fid )
{
return Imported_alIsFilter ( ( uint ) fid ) ;
}
2008-01-18 15:50:58 +00:00
#endregion alIsFilter
#region alFilteri
2008-01-20 19:00:03 +00:00
//[CLSCompliant(false)]
2008-03-27 17:14:14 +00:00
private delegate void Delegate_alFilteri ( uint fid , Enums . EfxFilteri param , int value ) ;
2008-01-25 22:14:16 +00:00
// typedef void (__cdecl *LPALFILTERI)( ALuint fid, ALenum param, ALint value );
2008-01-18 17:24:39 +00:00
2008-01-20 19:00:03 +00:00
//[CLSCompliant(false)]
2008-01-18 17:24:39 +00:00
private Delegate_alFilteri Imported_alFilteri ;
2008-01-16 18:43:52 +00:00
2008-01-18 17:24:39 +00:00
/// <summary>This function is used to set integer properties on Filter objects.</summary>
/// <param name="fid">Filter object identifier.</param>
/// <param name="param">Effect property to set.</param>
/// <param name="value">Integer value.</param>
2008-03-27 17:14:14 +00:00
[CLSCompliant( false )]
public void Filter ( uint fid , Enums . EfxFilteri param , int value )
2008-01-18 17:24:39 +00:00
{
2008-03-27 17:14:14 +00:00
Imported_alFilteri ( fid , param , value ) ;
2008-01-18 17:24:39 +00:00
}
2008-01-18 15:50:58 +00:00
2008-02-11 10:11:58 +00:00
/// <summary>This function is used to set integer properties on Filter objects.</summary>
/// <param name="fid">Filter object identifier.</param>
/// <param name="param">Effect property to set.</param>
/// <param name="value">Integer value.</param>
[CLSCompliant( true )]
public void Filter ( int fid , Enums . EfxFilteri param , int value )
{
2008-03-27 17:14:14 +00:00
Imported_alFilteri ( ( uint ) fid , param , value ) ;
2008-02-11 10:11:58 +00:00
}
2008-01-25 22:14:16 +00:00
#endregion alFilteri
2008-01-18 15:50:58 +00:00
#region alFilterf
2008-01-20 19:00:03 +00:00
//[CLSCompliant(false)]
2008-03-27 17:14:14 +00:00
private delegate void Delegate_alFilterf ( uint fid , Enums . EfxFilterf param , float value ) ;
2008-01-25 22:14:16 +00:00
// typedef void (__cdecl *LPALFILTERF)( ALuint fid, ALenum param, ALfloat value);
2008-01-16 18:43:52 +00:00
2008-01-20 19:00:03 +00:00
//[CLSCompliant(false)]
2008-01-18 17:24:39 +00:00
private Delegate_alFilterf Imported_alFilterf ;
/// <summary>This function is used to set floating point properties on Filter objects.</summary>
/// <param name="fid">Filter object identifier.</param>
/// <param name="param">Effect property to set.</param>
/// <param name="value">Floating point value.</param>
2008-03-27 17:14:14 +00:00
[CLSCompliant( false )]
public void Filter ( uint fid , Enums . EfxFilterf param , float value )
2008-01-18 17:24:39 +00:00
{
2008-03-27 17:14:14 +00:00
Imported_alFilterf ( fid , param , value ) ;
2008-01-18 17:24:39 +00:00
}
2008-01-18 15:50:58 +00:00
2008-02-11 10:11:58 +00:00
/// <summary>This function is used to set floating point properties on Filter objects.</summary>
/// <param name="fid">Filter object identifier.</param>
/// <param name="param">Effect property to set.</param>
/// <param name="value">Floating point value.</param>
[CLSCompliant( true )]
public void Filter ( int fid , Enums . EfxFilterf param , float value )
{
2008-03-27 17:14:14 +00:00
Imported_alFilterf ( ( uint ) fid , param , value ) ;
2008-02-11 10:11:58 +00:00
}
2008-01-18 15:50:58 +00:00
#endregion alFilterf
#region alGetFilteri
2008-01-20 19:00:03 +00:00
//[CLSCompliant(false)]
2008-03-27 17:14:14 +00:00
unsafe private delegate void Delegate_alGetFilteri ( uint fid , Enums . EfxFilteri pname , [ Out ] int * value ) ;
2008-01-25 22:14:16 +00:00
// typedef void (__cdecl *LPALGETFILTERI)( ALuint fid, ALenum pname, ALint* value );
2008-01-16 18:43:52 +00:00
2008-01-20 19:00:03 +00:00
//[CLSCompliant(false)]
2008-01-18 15:50:58 +00:00
private Delegate_alGetFilteri Imported_alGetFilteri ;
2008-01-18 17:24:39 +00:00
/// <summary>This function is used to retrieve integer properties from Filter objects.</summary>
/// <param name="fid">Filter object identifier.</param>
/// <param name="pname">Effect property to retrieve.</param>
/// <param name="value">Address where integer value will be stored.</param>
2008-03-27 17:14:14 +00:00
[CLSCompliant( false )]
public void GetFilter ( uint fid , Enums . EfxFilteri pname , out int value )
2008-01-18 15:50:58 +00:00
{
unsafe
{
fixed ( int * ptr = & value )
{
2008-03-27 17:14:14 +00:00
Imported_alGetFilteri ( fid , pname , ptr ) ;
2008-01-18 15:50:58 +00:00
}
}
}
2008-02-11 10:11:58 +00:00
/// <summary>This function is used to retrieve integer properties from Filter objects.</summary>
/// <param name="fid">Filter object identifier.</param>
/// <param name="pname">Effect property to retrieve.</param>
/// <param name="value">Address where integer value will be stored.</param>
[CLSCompliant( true )]
public void GetFilter ( int fid , Enums . EfxFilteri pname , out int value )
{
GetFilter ( ( uint ) fid , pname , out value ) ;
}
2008-01-18 15:50:58 +00:00
#endregion alGetFilteri
#region alGetFilterf
2008-01-20 19:00:03 +00:00
//[CLSCompliant(false)]
2008-03-27 17:14:14 +00:00
unsafe private delegate void Delegate_alGetFilterf ( uint fid , Enums . EfxFilterf pname , [ Out ] float * value ) ;
2008-01-25 22:14:16 +00:00
// typedef void (__cdecl *LPALGETFILTERF)( ALuint fid, ALenum pname, ALfloat* value );
2008-01-16 18:43:52 +00:00
2008-01-20 19:00:03 +00:00
//[CLSCompliant(false)]
2008-01-18 15:50:58 +00:00
private Delegate_alGetFilterf Imported_alGetFilterf ;
2008-01-18 17:24:39 +00:00
/// <summary>This function is used to retrieve floating point properties from Filter objects.</summary>
/// <param name="fid">Filter object identifier.</param>
/// <param name="pname">Effect property to retrieve.</param>
/// <param name="value">Address where floating point value will be stored.</param>
2008-03-27 17:14:14 +00:00
[CLSCompliant( false )]
public void GetFilter ( uint fid , Enums . EfxFilterf pname , out float value )
2008-01-18 15:50:58 +00:00
{
unsafe
{
fixed ( float * ptr = & value )
{
2008-03-27 17:14:14 +00:00
Imported_alGetFilterf ( fid , pname , ptr ) ;
2008-01-18 15:50:58 +00:00
}
}
}
2008-02-11 10:11:58 +00:00
/// <summary>This function is used to retrieve floating point properties from Filter objects.</summary>
/// <param name="fid">Filter object identifier.</param>
/// <param name="pname">Effect property to retrieve.</param>
/// <param name="value">Address where floating point value will be stored.</param>
[CLSCompliant( true )]
public void GetFilter ( int fid , Enums . EfxFilterf pname , out float value )
{
GetFilter ( ( uint ) fid , pname , out value ) ;
}
2008-01-18 15:50:58 +00:00
#endregion alGetFilterf
2008-01-17 19:02:37 +00:00
// 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 );
2008-01-16 18:43:52 +00:00
2008-01-18 15:50:58 +00:00
#endregion Filter Object
#region Auxiliary Effect Slot Object
2008-01-16 23:57:54 +00:00
2008-01-18 15:50:58 +00:00
#region alGenAuxiliaryEffectSlots
2008-01-18 13:32:51 +00:00
2008-01-20 19:00:03 +00:00
//[CLSCompliant(false)]
2008-03-27 17:14:14 +00:00
unsafe private delegate void Delegate_alGenAuxiliaryEffectSlots ( int n , [ Out ] uint * slots ) ;
2008-01-25 22:14:16 +00:00
// typedef void (__cdecl *LPALGENAUXILIARYEFFECTSLOTS)( ALsizei n, ALuint* slots );
2008-01-18 15:50:58 +00:00
2008-01-20 19:00:03 +00:00
//[CLSCompliant(false)]
2008-01-18 15:50:58 +00:00
private Delegate_alGenAuxiliaryEffectSlots Imported_alGenAuxiliaryEffectSlots ;
2008-01-25 22:14:16 +00:00
/// <summary>The GenAuxiliaryEffectSlots function is used to create one or more Auxiliary Effect Slots. The number of slots that can be created will be dependant upon the Open AL device used.</summary>
2008-01-18 17:24:39 +00:00
/// <remarks>An application should check the OpenAL error state after making this call to determine if the Effect Slot was successfully created. If the function call fails then none of the requested Effect Slots are created. A good strategy for creating any OpenAL object is to use a for-loop and generate one object each loop iteration and then check for an error condition. If an error is set then the loop can be broken and the application can determine if sufficient resources are available.</remarks>
/// <param name="n">Number of Auxiliary Effect Slots to be created.</param>
/// <param name="slots">Pointer addressing sufficient memory to store n Effect Slot object identifiers.</param>
2008-03-27 17:14:14 +00:00
[CLSCompliant( false )]
public void GenAuxiliaryEffectSlots ( int n , out uint slots )
2008-01-18 15:50:58 +00:00
{
unsafe
{
fixed ( uint * ptr = & slots )
{
2008-03-27 17:14:14 +00:00
Imported_alGenAuxiliaryEffectSlots ( n , ptr ) ;
2008-01-18 15:50:58 +00:00
slots = * ptr ;
}
}
}
2008-02-11 10:11:58 +00:00
/// <summary>The GenAuxiliaryEffectSlots function is used to create one or more Auxiliary Effect Slots. The number of slots that can be created will be dependant upon the Open AL device used.</summary>
/// <remarks>An application should check the OpenAL error state after making this call to determine if the Effect Slot was successfully created. If the function call fails then none of the requested Effect Slots are created. A good strategy for creating any OpenAL object is to use a for-loop and generate one object each loop iteration and then check for an error condition. If an error is set then the loop can be broken and the application can determine if sufficient resources are available.</remarks>
/// <param name="n">Number of Auxiliary Effect Slots to be created.</param>
/// <param name="slots">Pointer addressing sufficient memory to store n Effect Slot object identifiers.</param>
[CLSCompliant( true )]
public void GenAuxiliaryEffectSlots ( int n , out int [ ] slots )
{
uint [ ] temp = new uint [ n ] ;
GenAuxiliaryEffectSlots ( n , out temp [ 0 ] ) ;
slots = new int [ n ] ;
2008-03-27 17:14:14 +00:00
for ( int i = 0 ; i < n ; i + + )
2008-02-11 10:11:58 +00:00
{
slots [ i ] = ( int ) temp [ i ] ;
}
}
2008-03-27 16:46:23 +00:00
/// <summary>The GenAuxiliaryEffectSlots function is used to create one or more Auxiliary Effect Slots. The number of slots that can be created will be dependant upon the Open AL device used.</summary>
/// <remarks>An application should check the OpenAL error state after making this call to determine if the Effect Slot was successfully created. If the function call fails then none of the requested Effect Slots are created. A good strategy for creating any OpenAL object is to use a for-loop and generate one object each loop iteration and then check for an error condition. If an error is set then the loop can be broken and the application can determine if sufficient resources are available.</remarks>
/// <param name="slots">Pointer addressing sufficient memory to store n Effect Slot object identifiers.</param>
[CLSCompliant( true )]
2008-03-27 17:14:14 +00:00
public void GenAuxiliaryEffectSlots ( int [ ] slots )
2008-03-27 16:46:23 +00:00
{
uint [ ] temp = new uint [ slots . Length ] ;
GenAuxiliaryEffectSlots ( temp . Length , out temp [ 0 ] ) ;
for ( int i = 0 ; i < temp . Length ; i + + )
{
slots [ i ] = ( int ) temp [ i ] ;
}
}
2008-03-27 17:14:14 +00:00
/// <summary>The GenAuxiliaryEffectSlots function is used to create one or more Auxiliary Effect Slots. The number of slots that can be created will be dependant upon the Open AL device used.</summary>
/// <remarks>An application should check the OpenAL error state after making this call to determine if the Effect Slot was successfully created. If the function call fails then none of the requested Effect Slots are created. A good strategy for creating any OpenAL object is to use a for-loop and generate one object each loop iteration and then check for an error condition. If an error is set then the loop can be broken and the application can determine if sufficient resources are available.</remarks>
/// <param name="n">Number of Auxiliary Effect Slots to be created.</param>
/// <returns>Pointer addressing sufficient memory to store n Effect Slot object identifiers.</returns>
[CLSCompliant( true )]
public int [ ] GenAuxiliaryEffectSlots ( int n )
{
uint [ ] temp = new uint [ n ] ;
GenAuxiliaryEffectSlots ( temp . Length , out temp [ 0 ] ) ;
int [ ] slots = new int [ n ] ;
for ( int i = 0 ; i < temp . Length ; i + + )
{
slots [ i ] = ( int ) temp [ i ] ;
}
return slots ;
}
2008-01-18 15:50:58 +00:00
/// <summary>This function generates only one Auxiliary Effect Slot.</summary>
2008-01-18 17:24:39 +00:00
/// <param name="slot">Storage UInt32 for the new auxiliary effect slot name/handle.</param>
2008-02-11 10:11:58 +00:00
[CLSCompliant( false )]
2008-03-27 17:14:14 +00:00
public void GenAuxiliaryEffectSlots ( out uint slot )
2008-01-18 15:50:58 +00:00
{
unsafe
{
fixed ( uint * ptr = & slot )
{
2008-03-27 17:14:14 +00:00
Imported_alGenAuxiliaryEffectSlots ( 1 , ptr ) ;
2008-01-18 15:50:58 +00:00
}
}
}
2008-01-18 13:32:51 +00:00
2008-02-11 10:11:58 +00:00
/// <summary>This function generates only one Auxiliary Effect Slot.</summary>
/// <param name="slot">Storage UInt32 for the new auxiliary effect slot name/handle.</param>
2008-03-27 17:14:14 +00:00
[CLSCompliant( true )]
2008-02-11 10:11:58 +00:00
public void GenAuxiliaryEffectSlots ( out int slot )
{
uint temp ;
GenAuxiliaryEffectSlots ( out temp ) ;
slot = ( int ) temp ;
}
2008-03-27 16:46:23 +00:00
/// <summary>This function generates only one Auxiliary Effect Slot.</summary>
2008-03-27 17:14:14 +00:00
/// <returns>Storage UInt32 for the new auxiliary effect slot name/handle.</returns>
2008-03-27 16:46:23 +00:00
[CLSCompliant( true )]
2008-03-27 17:14:14 +00:00
public int GenAuxiliaryEffectSlots ( )
2008-03-27 16:46:23 +00:00
{
uint temp ;
GenAuxiliaryEffectSlots ( out temp ) ;
return ( int ) temp ;
}
2008-01-18 15:50:58 +00:00
#endregion alGenAuxiliaryEffectSlots
2008-01-18 13:32:51 +00:00
2008-01-18 15:50:58 +00:00
#region alDeleteAuxiliaryEffectSlots
2008-01-18 13:32:51 +00:00
2008-01-20 19:00:03 +00:00
//[CLSCompliant(false)]
2008-03-27 17:14:14 +00:00
unsafe private delegate void Delegate_alDeleteAuxiliaryEffectSlots ( int n , [ In ] uint * slots ) ;
2008-01-25 22:14:16 +00:00
// typedef void (__cdecl *LPALDELETEAUXILIARYEFFECTSLOTS)( ALsizei n, ALuint* slots );
2008-01-18 13:32:51 +00:00
2008-01-20 19:00:03 +00:00
//[CLSCompliant(false)]
2008-01-18 15:50:58 +00:00
private Delegate_alDeleteAuxiliaryEffectSlots Imported_alDeleteAuxiliaryEffectSlots ;
2008-01-16 18:43:52 +00:00
2008-01-25 22:14:16 +00:00
/// <summary>The DeleteAuxiliaryEffectSlots function is used to delete and free resources for Auxiliary Effect Slots previously created with GenAuxiliaryEffectSlots.</summary>
2008-01-18 17:24:39 +00:00
/// <param name="n">Number of Auxiliary Effect Slots to be deleted.</param>
/// <param name="slots">Pointer to n Effect Slot object identifiers.</param>
2008-03-27 17:14:14 +00:00
[CLSCompliant( false )]
public void DeleteAuxiliaryEffectSlots ( int n , ref uint [ ] slots )
2008-01-18 15:50:58 +00:00
{
unsafe
{
fixed ( uint * ptr = slots )
{
2008-03-27 17:14:14 +00:00
Imported_alDeleteAuxiliaryEffectSlots ( n , ptr ) ;
2008-01-18 15:50:58 +00:00
}
}
}
2008-01-16 18:43:52 +00:00
2008-02-11 10:11:58 +00:00
/// <summary>The DeleteAuxiliaryEffectSlots function is used to delete and free resources for Auxiliary Effect Slots previously created with GenAuxiliaryEffectSlots.</summary>
/// <param name="n">Number of Auxiliary Effect Slots to be deleted.</param>
/// <param name="slots">Pointer to n Effect Slot object identifiers.</param>
[CLSCompliant( true )]
public void DeleteAuxiliaryEffectSlots ( int n , ref int [ ] slots )
{
uint [ ] temp = new uint [ n ] ;
2008-03-27 17:14:14 +00:00
for ( int i = 0 ; i < n ; i + + )
2008-02-11 10:11:58 +00:00
{
temp [ i ] = ( uint ) slots [ i ] ;
}
DeleteAuxiliaryEffectSlots ( n , ref temp ) ;
}
2008-03-27 16:46:23 +00:00
/// <summary>The DeleteAuxiliaryEffectSlots function is used to delete and free resources for Auxiliary Effect Slots previously created with GenAuxiliaryEffectSlots.</summary>
/// <param name="n">Number of Auxiliary Effect Slots to be deleted.</param>
/// <param name="slots">Pointer to n Effect Slot object identifiers.</param>
[CLSCompliant( true )]
public void DeleteAuxiliaryEffectSlots ( int [ ] slots )
{
uint [ ] temp = new uint [ slots . Length ] ;
for ( int i = 0 ; i < temp . Length ; i + + )
{
temp [ i ] = ( uint ) slots [ i ] ;
}
DeleteAuxiliaryEffectSlots ( temp . Length , ref temp ) ;
}
2008-01-18 15:50:58 +00:00
/// <summary>This function deletes one AuxiliaryEffectSlot only.</summary>
2008-01-18 17:24:39 +00:00
/// <param name="slot">Pointer to an auxiliary effect slot name/handle identifying the Auxiliary Effect Slot Object to be deleted.</param>
2008-03-27 17:14:14 +00:00
[CLSCompliant( false )]
2008-01-18 15:50:58 +00:00
public void DeleteAuxiliaryEffectSlots ( ref uint slot )
{
unsafe
{
fixed ( uint * ptr = & slot )
{
2008-03-27 17:14:14 +00:00
Imported_alDeleteAuxiliaryEffectSlots ( 1 , ptr ) ;
2008-01-18 15:50:58 +00:00
}
}
}
2008-02-11 10:11:58 +00:00
/// <summary>This function deletes one AuxiliaryEffectSlot only.</summary>
/// <param name="slot">Pointer to an auxiliary effect slot name/handle identifying the Auxiliary Effect Slot Object to be deleted.</param>
[CLSCompliant( true )]
public void DeleteAuxiliaryEffectSlots ( ref int slot )
{
uint temp = ( uint ) slot ;
DeleteAuxiliaryEffectSlots ( ref temp ) ;
}
2008-03-27 16:46:23 +00:00
/// <summary>This function deletes one AuxiliaryEffectSlot only.</summary>
/// <param name="slot">Pointer to an auxiliary effect slot name/handle identifying the Auxiliary Effect Slot Object to be deleted.</param>
[CLSCompliant( true )]
public void DeleteAuxiliaryEffectSlots ( int slot )
{
uint temp = ( uint ) slot ;
DeleteAuxiliaryEffectSlots ( ref temp ) ;
}
2008-01-18 15:50:58 +00:00
#endregion alDeleteAuxiliaryEffectSlots
#region alIsAuxiliaryEffectSlot
2008-01-16 18:43:52 +00:00
2008-01-20 19:00:03 +00:00
//[CLSCompliant(false)]
2008-01-18 17:24:39 +00:00
private delegate bool Delegate_alIsAuxiliaryEffectSlot ( uint slot ) ;
2008-01-25 22:14:16 +00:00
// typedef ALboolean (__cdecl *LPALISAUXILIARYEFFECTSLOT)( ALuint slot );
2008-01-18 17:24:39 +00:00
2008-01-20 19:00:03 +00:00
//[CLSCompliant(false)]
2008-01-18 17:24:39 +00:00
private Delegate_alIsAuxiliaryEffectSlot Imported_alIsAuxiliaryEffectSlot ;
2008-01-16 18:43:52 +00:00
2008-01-25 22:14:16 +00:00
/// <summary>The IsAuxiliaryEffectSlot function is used to determine if an object identifier is a valid Auxiliary Effect Slot object.</summary>
2008-01-18 17:24:39 +00:00
/// <param name="slot">Effect Slot object identifier to validate.</param>
/// <returns>True if the identifier is a valid Auxiliary Effect Slot, False otherwise.</returns>
2008-03-27 17:14:14 +00:00
[CLSCompliant( false )]
2008-01-18 17:24:39 +00:00
public bool IsAuxiliaryEffectSlot ( uint slot )
{
2008-03-27 17:14:14 +00:00
return Imported_alIsAuxiliaryEffectSlot ( slot ) ;
2008-01-18 17:24:39 +00:00
}
2008-01-18 15:50:58 +00:00
2008-02-11 10:11:58 +00:00
/// <summary>The IsAuxiliaryEffectSlot function is used to determine if an object identifier is a valid Auxiliary Effect Slot object.</summary>
/// <param name="slot">Effect Slot object identifier to validate.</param>
/// <returns>True if the identifier is a valid Auxiliary Effect Slot, False otherwise.</returns>
2008-03-27 17:14:14 +00:00
[CLSCompliant( true )]
2008-02-11 10:11:58 +00:00
public bool IsAuxiliaryEffectSlot ( int slot )
{
2008-03-27 17:14:14 +00:00
return Imported_alIsAuxiliaryEffectSlot ( ( uint ) slot ) ;
2008-02-11 10:11:58 +00:00
}
2008-01-18 15:50:58 +00:00
#endregion alIsAuxiliaryEffectSlot
#region alAuxiliaryEffectSloti
2008-01-20 19:00:03 +00:00
//[CLSCompliant(false)]
2008-03-27 17:14:14 +00:00
private delegate void Delegate_alAuxiliaryEffectSloti ( uint asid , Enums . EfxAuxiliaryi param , int value ) ;
2008-01-25 22:14:16 +00:00
// typedef void (__cdecl *LPALAUXILIARYEFFECTSLOTI)( ALuint asid, ALenum param, ALint value );
2008-01-18 17:24:39 +00:00
2008-01-20 19:00:03 +00:00
//[CLSCompliant(false)]
2008-01-18 17:24:39 +00:00
private Delegate_alAuxiliaryEffectSloti Imported_alAuxiliaryEffectSloti ;
2008-01-16 18:43:52 +00:00
2008-01-18 17:24:39 +00:00
/// <summary>This function is used to set integer properties on Auxiliary Effect Slot objects.</summary>
/// <param name="asid">Auxiliary Effect Slot object identifier.</param>
/// <param name="param">Auxiliary Effect Slot property to set.</param>
/// <param name="value">Integer value.</param>
2008-03-27 17:14:14 +00:00
[CLSCompliant( false )]
public void AuxiliaryEffectSlot ( uint asid , Enums . EfxAuxiliaryi param , int value )
2008-01-18 17:24:39 +00:00
{
2008-03-27 17:14:14 +00:00
Imported_alAuxiliaryEffectSloti ( asid , param , value ) ;
2008-01-18 17:24:39 +00:00
}
2008-01-18 15:50:58 +00:00
2008-02-11 10:11:58 +00:00
/// <summary>This function is used to set integer properties on Auxiliary Effect Slot objects.</summary>
/// <param name="asid">Auxiliary Effect Slot object identifier.</param>
/// <param name="param">Auxiliary Effect Slot property to set.</param>
/// <param name="value">Integer value.</param>
[CLSCompliant( true )]
public void AuxiliaryEffectSlot ( int asid , Enums . EfxAuxiliaryi param , int value )
{
2008-03-27 17:14:14 +00:00
Imported_alAuxiliaryEffectSloti ( ( uint ) asid , param , value ) ;
2008-02-11 10:11:58 +00:00
}
2008-01-18 15:50:58 +00:00
#endregion alAuxiliaryEffectSloti
#region alAuxiliaryEffectSlotf
2008-01-20 19:00:03 +00:00
//[CLSCompliant(false)]
2008-03-27 17:14:14 +00:00
private delegate void Delegate_alAuxiliaryEffectSlotf ( uint asid , Enums . EfxAuxiliaryf param , float value ) ;
2008-01-25 22:14:16 +00:00
// typedef void (__cdecl *LPALAUXILIARYEFFECTSLOTF)( ALuint asid, ALenum param, ALfloat value );
2008-01-16 18:43:52 +00:00
2008-01-20 19:00:03 +00:00
//[CLSCompliant(false)]
2008-01-18 17:24:39 +00:00
private Delegate_alAuxiliaryEffectSlotf Imported_alAuxiliaryEffectSlotf ;
/// <summary>This function is used to set floating point properties on Auxiliary Effect Slot objects.</summary>
/// <param name="asid">Auxiliary Effect Slot object identifier.</param>
/// <param name="param">Auxiliary Effect Slot property to set.</param>
/// <param name="value">Floating point value.</param>
2008-03-27 17:14:14 +00:00
[CLSCompliant( false )]
public void AuxiliaryEffectSlot ( uint asid , Enums . EfxAuxiliaryf param , float value )
2008-01-18 17:24:39 +00:00
{
2008-03-27 17:14:14 +00:00
Imported_alAuxiliaryEffectSlotf ( asid , param , value ) ;
2008-01-18 17:24:39 +00:00
}
2008-01-18 15:50:58 +00:00
2008-02-11 10:11:58 +00:00
/// <summary>This function is used to set floating point properties on Auxiliary Effect Slot objects.</summary>
/// <param name="asid">Auxiliary Effect Slot object identifier.</param>
/// <param name="param">Auxiliary Effect Slot property to set.</param>
/// <param name="value">Floating point value.</param>
[CLSCompliant( true )]
public void AuxiliaryEffectSlot ( int asid , Enums . EfxAuxiliaryf param , float value )
{
2008-03-27 17:14:14 +00:00
Imported_alAuxiliaryEffectSlotf ( ( uint ) asid , param , value ) ;
2008-02-11 10:11:58 +00:00
}
2008-01-18 15:50:58 +00:00
#endregion alAuxiliaryEffectSlotf
#region alGetAuxiliaryEffectSloti
2008-01-20 19:00:03 +00:00
//[CLSCompliant(false)]
2008-03-27 17:14:14 +00:00
unsafe private delegate void Delegate_alGetAuxiliaryEffectSloti ( uint asid , Enums . EfxAuxiliaryi pname , [ Out ] int * value ) ;
2008-01-25 22:14:16 +00:00
// typedef void (__cdecl *LPALGETAUXILIARYEFFECTSLOTI)( ALuint asid, ALenum pname, ALint* value );
2008-01-16 18:43:52 +00:00
2008-01-20 19:00:03 +00:00
//[CLSCompliant(false)]
2008-01-18 15:50:58 +00:00
private Delegate_alGetAuxiliaryEffectSloti Imported_alGetAuxiliaryEffectSloti ;
2008-01-18 17:24:39 +00:00
/// <summary>This function is used to retrieve integer properties on Auxiliary Effect Slot objects.</summary>
/// <param name="asid">Auxiliary Effect Slot object identifier.</param>
/// <param name="pname">Auxiliary Effect Slot property to retrieve.</param>
/// <param name="value">Address where integer value will be stored.</param>
2008-03-27 17:14:14 +00:00
[CLSCompliant( false )]
public void GetAuxiliaryEffectSlot ( uint asid , Enums . EfxAuxiliaryi pname , out int value )
2008-01-18 15:50:58 +00:00
{
unsafe
{
fixed ( int * ptr = & value )
{
2008-03-27 17:14:14 +00:00
Imported_alGetAuxiliaryEffectSloti ( asid , pname , ptr ) ;
2008-01-18 15:50:58 +00:00
}
}
}
2008-02-11 10:11:58 +00:00
/// <summary>This function is used to retrieve integer properties on Auxiliary Effect Slot objects.</summary>
/// <param name="asid">Auxiliary Effect Slot object identifier.</param>
/// <param name="pname">Auxiliary Effect Slot property to retrieve.</param>
/// <param name="value">Address where integer value will be stored.</param>
[CLSCompliant( true )]
public void GetAuxiliaryEffectSlot ( int asid , Enums . EfxAuxiliaryi pname , out int value )
{
GetAuxiliaryEffectSlot ( ( uint ) asid , pname , out value ) ;
}
2008-01-18 15:50:58 +00:00
#endregion alGetAuxiliaryEffectSloti
#region alGetAuxiliaryEffectSlotf
2008-01-20 19:29:42 +00:00
//[CLSCompliant(false)]
2008-03-27 17:14:14 +00:00
unsafe private delegate void Delegate_alGetAuxiliaryEffectSlotf ( uint asid , Enums . EfxAuxiliaryf pname , [ Out ] float * value ) ;
2008-01-25 22:14:16 +00:00
// typedef void (__cdecl *LPALGETAUXILIARYEFFECTSLOTF)( ALuint asid, ALenum pname, ALfloat* value );
2008-01-17 19:02:37 +00:00
2008-01-20 19:29:42 +00:00
//[CLSCompliant(false)]
2008-01-18 15:50:58 +00:00
private Delegate_alGetAuxiliaryEffectSlotf Imported_alGetAuxiliaryEffectSlotf ;
2008-01-18 17:24:39 +00:00
/// <summary>This function is used to retrieve floating properties on Auxiliary Effect Slot objects.</summary>
/// <param name="asid">Auxiliary Effect Slot object identifier.</param>
/// <param name="pname">Auxiliary Effect Slot property to retrieve.</param>
/// <param name="value">Address where floating point value will be stored.</param>
2008-03-27 17:14:14 +00:00
[CLSCompliant( false )]
public void GetAuxiliaryEffectSlot ( uint asid , Enums . EfxAuxiliaryf pname , out float value )
2008-01-18 15:50:58 +00:00
{
unsafe
{
fixed ( float * ptr = & value )
{
2008-03-27 17:14:14 +00:00
Imported_alGetAuxiliaryEffectSlotf ( asid , pname , ptr ) ;
2008-01-18 15:50:58 +00:00
}
}
}
2008-03-27 17:14:14 +00:00
/// <summary>This function is used to retrieve floating properties on Auxiliary Effect Slot objects.</summary>
2008-02-11 10:11:58 +00:00
/// <param name="asid">Auxiliary Effect Slot object identifier.</param>
/// <param name="pname">Auxiliary Effect Slot property to retrieve.</param>
/// <param name="value">Address where floating point value will be stored.</param>
[CLSCompliant( true )]
public void GetAuxiliaryEffectSlot ( int asid , Enums . EfxAuxiliaryf pname , out float value )
{
GetAuxiliaryEffectSlot ( ( uint ) asid , pname , out value ) ;
}
2008-01-18 15:50:58 +00:00
#endregion alGetAuxiliaryEffectSlotf
2008-01-17 19:02:37 +00:00
// 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 );
2008-01-16 18:43:52 +00:00
// typedef void (__cdecl *LPALGETAUXILIARYEFFECTSLOTFV)( ALuint asid, ALenum pname, ALfloat* values );
2008-01-17 19:02:37 +00:00
2008-01-18 15:50:58 +00:00
#endregion Auxiliary Effect Slot Object
2008-01-17 20:55:56 +00:00
#region Constructor / Extension Loading
private bool _valid ;
/// <summary>Returns True if the EFX Extension has been found and could be initialized.</summary>
public bool IsInitialized
2008-03-27 17:14:14 +00:00
{
get
{
return _valid ;
}
}
2008-01-17 20:55:56 +00:00
2008-01-18 13:32:51 +00:00
public EfxExtension ( )
2008-01-17 20:55:56 +00:00
{
_valid = false ;
2008-03-27 17:14:14 +00:00
if ( Alc . IsExtensionPresent ( Alc . GetContextsDevice ( Alc . GetCurrentContext ( ) ) , "ALC_EXT_EFX" ) = = false )
2008-01-17 20:55:56 +00:00
{
2008-03-27 17:14:14 +00:00
Trace . WriteLine ( "Efx Extension ALC_EXT_EFX is unknown to the Device." ) ;
2008-01-17 20:55:56 +00:00
return ;
}
2008-01-25 22:14:16 +00:00
// Console.WriteLine("ALC_EXT_EFX found. Efx can be used.");
2008-01-17 20:55:56 +00:00
try
{
2008-03-27 17:14:14 +00:00
Imported_alGenEffects = ( Delegate_alGenEffects ) Marshal . GetDelegateForFunctionPointer ( AL . GetProcAddress ( "alGenEffects" ) , typeof ( Delegate_alGenEffects ) ) ;
Imported_alDeleteEffects = ( Delegate_alDeleteEffects ) Marshal . GetDelegateForFunctionPointer ( AL . GetProcAddress ( "alDeleteEffects" ) , typeof ( Delegate_alDeleteEffects ) ) ;
Imported_alIsEffect = ( Delegate_alIsEffect ) Marshal . GetDelegateForFunctionPointer ( AL . GetProcAddress ( "alIsEffect" ) , typeof ( Delegate_alIsEffect ) ) ;
Imported_alEffecti = ( Delegate_alEffecti ) Marshal . GetDelegateForFunctionPointer ( AL . GetProcAddress ( "alEffecti" ) , typeof ( Delegate_alEffecti ) ) ;
Imported_alEffectf = ( Delegate_alEffectf ) Marshal . GetDelegateForFunctionPointer ( AL . GetProcAddress ( "alEffectf" ) , typeof ( Delegate_alEffectf ) ) ;
Imported_alEffectfv = ( Delegate_alEffectfv ) Marshal . GetDelegateForFunctionPointer ( AL . GetProcAddress ( "alEffectfv" ) , typeof ( Delegate_alEffectfv ) ) ;
Imported_alGetEffecti = ( Delegate_alGetEffecti ) Marshal . GetDelegateForFunctionPointer ( AL . GetProcAddress ( "alGetEffecti" ) , typeof ( Delegate_alGetEffecti ) ) ;
Imported_alGetEffectf = ( Delegate_alGetEffectf ) Marshal . GetDelegateForFunctionPointer ( AL . GetProcAddress ( "alGetEffectf" ) , typeof ( Delegate_alGetEffectf ) ) ;
Imported_alGetEffectfv = ( Delegate_alGetEffectfv ) Marshal . GetDelegateForFunctionPointer ( AL . GetProcAddress ( "alGetEffectfv" ) , typeof ( Delegate_alGetEffectfv ) ) ;
2008-01-18 13:32:51 +00:00
} catch ( Exception e )
2008-01-17 20:55:56 +00:00
{
2008-03-27 17:14:14 +00:00
Trace . WriteLine ( "Failed to marshal Effect functions. " + e . ToString ( ) ) ;
2008-01-17 20:55:56 +00:00
return ;
}
2008-01-25 22:14:16 +00:00
// Console.WriteLine("Effect functions appear to be ok.");
2008-01-17 20:55:56 +00:00
try
{
2008-03-27 17:14:14 +00:00
Imported_alGenFilters = ( Delegate_alGenFilters ) Marshal . GetDelegateForFunctionPointer ( AL . GetProcAddress ( "alGenFilters" ) , typeof ( Delegate_alGenFilters ) ) ;
Imported_alDeleteFilters = ( Delegate_alDeleteFilters ) Marshal . GetDelegateForFunctionPointer ( AL . GetProcAddress ( "alDeleteFilters" ) , typeof ( Delegate_alDeleteFilters ) ) ;
Imported_alIsFilter = ( Delegate_alIsFilter ) Marshal . GetDelegateForFunctionPointer ( AL . GetProcAddress ( "alIsFilter" ) , typeof ( Delegate_alIsFilter ) ) ;
Imported_alFilteri = ( Delegate_alFilteri ) Marshal . GetDelegateForFunctionPointer ( AL . GetProcAddress ( "alFilteri" ) , typeof ( Delegate_alFilteri ) ) ;
Imported_alFilterf = ( Delegate_alFilterf ) Marshal . GetDelegateForFunctionPointer ( AL . GetProcAddress ( "alFilterf" ) , typeof ( Delegate_alFilterf ) ) ;
Imported_alGetFilteri = ( Delegate_alGetFilteri ) Marshal . GetDelegateForFunctionPointer ( AL . GetProcAddress ( "alGetFilteri" ) , typeof ( Delegate_alGetFilteri ) ) ;
Imported_alGetFilterf = ( Delegate_alGetFilterf ) Marshal . GetDelegateForFunctionPointer ( AL . GetProcAddress ( "alGetFilterf" ) , typeof ( Delegate_alGetFilterf ) ) ;
2008-01-18 13:32:51 +00:00
} catch ( Exception e )
2008-01-17 20:55:56 +00:00
{
2008-03-27 17:14:14 +00:00
Trace . WriteLine ( "Failed to marshal Filter functions. " + e . ToString ( ) ) ;
2008-01-17 20:55:56 +00:00
return ;
}
2008-01-25 22:14:16 +00:00
// Console.WriteLine("Filter functions appear to be ok.");
2008-01-17 20:55:56 +00:00
try
{
2008-03-27 17:14:14 +00:00
Imported_alGenAuxiliaryEffectSlots = ( Delegate_alGenAuxiliaryEffectSlots ) Marshal . GetDelegateForFunctionPointer ( AL . GetProcAddress ( "alGenAuxiliaryEffectSlots" ) , typeof ( Delegate_alGenAuxiliaryEffectSlots ) ) ;
Imported_alDeleteAuxiliaryEffectSlots = ( Delegate_alDeleteAuxiliaryEffectSlots ) Marshal . GetDelegateForFunctionPointer ( AL . GetProcAddress ( "alDeleteAuxiliaryEffectSlots" ) , typeof ( Delegate_alDeleteAuxiliaryEffectSlots ) ) ;
Imported_alIsAuxiliaryEffectSlot = ( Delegate_alIsAuxiliaryEffectSlot ) Marshal . GetDelegateForFunctionPointer ( AL . GetProcAddress ( "alIsAuxiliaryEffectSlot" ) , typeof ( Delegate_alIsAuxiliaryEffectSlot ) ) ;
Imported_alAuxiliaryEffectSloti = ( Delegate_alAuxiliaryEffectSloti ) Marshal . GetDelegateForFunctionPointer ( AL . GetProcAddress ( "alAuxiliaryEffectSloti" ) , typeof ( Delegate_alAuxiliaryEffectSloti ) ) ;
Imported_alAuxiliaryEffectSlotf = ( Delegate_alAuxiliaryEffectSlotf ) Marshal . GetDelegateForFunctionPointer ( AL . GetProcAddress ( "alAuxiliaryEffectSlotf" ) , typeof ( Delegate_alAuxiliaryEffectSlotf ) ) ;
Imported_alGetAuxiliaryEffectSloti = ( Delegate_alGetAuxiliaryEffectSloti ) Marshal . GetDelegateForFunctionPointer ( AL . GetProcAddress ( "alGetAuxiliaryEffectSloti" ) , typeof ( Delegate_alGetAuxiliaryEffectSloti ) ) ;
Imported_alGetAuxiliaryEffectSlotf = ( Delegate_alGetAuxiliaryEffectSlotf ) Marshal . GetDelegateForFunctionPointer ( AL . GetProcAddress ( "alGetAuxiliaryEffectSlotf" ) , typeof ( Delegate_alGetAuxiliaryEffectSlotf ) ) ;
2008-01-18 13:32:51 +00:00
} catch ( Exception e )
2008-01-17 20:55:56 +00:00
{
2008-03-27 17:14:14 +00:00
Trace . WriteLine ( "Failed to marshal AuxiliaryEffectSlot functions. " + e . ToString ( ) ) ;
2008-01-17 20:55:56 +00:00
return ;
}
2008-01-25 22:14:16 +00:00
// Console.WriteLine("Auxiliary Effect Slot functions appear to be ok.");
2008-01-17 20:55:56 +00:00
2008-01-18 17:33:07 +00:00
// didn't return so far, everything went fine.
2008-01-17 20:55:56 +00:00
_valid = true ;
}
#endregion Constructor / Extension Loading
2008-01-16 18:43:52 +00:00
}
2008-01-18 13:32:51 +00:00
2008-01-16 18:43:52 +00:00
}