diff --git a/Source/OpenTK/OpenAL/AlFunctions.cs b/Source/OpenTK/OpenAL/AlFunctions.cs index bedd0de4..d5aba28b 100644 --- a/Source/OpenTK/OpenAL/AlFunctions.cs +++ b/Source/OpenTK/OpenAL/AlFunctions.cs @@ -498,7 +498,16 @@ namespace OpenTK.OpenAL Source(sid,(Enums.ALSourcei) param,( value ) ? 1 : 0); } - // This function sets 3 integer properties of a source. This property is used to establish connections between Sources and Auxiliary Effect Slots. + /// (Helper) Binds a Buffer to a Source handle. + /// Source name to attach the Buffer to. + /// Buffer name which is attached to the Source. + [CLSCompliant(false)] + public static void BindBufferToSource( uint source,uint buffer ) + { + Source(source,Enums.ALSourcei.Buffer,(int)buffer); + } + + /// This function sets 3 integer properties of a source. This property is used to establish connections between Sources and Auxiliary Effect Slots. /// Source name whose attribute is being set. /// The name of the attribute to set: EfxAuxiliarySendFilter /// The value to set the attribute to. (EFX Extension) The destination Auxiliary Effect Slot ID @@ -508,6 +517,18 @@ namespace OpenTK.OpenAL public static extern void Source( uint sid,Enums.ALSource3i param,int value1,int value2,int value3 ); // AL_API void AL_APIENTRY alSource3i( ALuint sid, ALenum param, ALint value1, ALint value2, ALint value3 ); + + /// (Helper) Reroutes a Source's output into an Auxiliary Effect Slot. + /// The Source handle who's output is forwarded. + /// The Auxiliary Effect Slot handle that receives input from the Source. + /// Every Source has only a limited number of slots it can feed data to. The number must stay below AlcContextAttributes.EfxMaxAuxiliarySends + /// Filter handle to be attached between Source ouput and Auxiliary Slot input. Use 0 or EfxFilterType.FilterNull for no filter. + [CLSCompliant(false)] + public static void BindSourceToAuxiliarySlot( uint source,uint slot,int slotnumber, uint filter ) + { + AL.Source(source,Enums.ALSource3i.EfxAuxiliarySendFilter,(int) slot,slotnumber,(int) filter); + } + // Not used by any Enum: // AL_API void AL_APIENTRY alSourcefv( ALuint sid, ALenum param, const ALfloat* values ); // AL_API void AL_APIENTRY alSourceiv( ALuint sid, ALenum param, const ALint* values ); diff --git a/Source/OpenTK/OpenAL/EfxFunctions.cs b/Source/OpenTK/OpenAL/EfxFunctions.cs index 46571e92..b8545b1c 100644 --- a/Source/OpenTK/OpenAL/EfxFunctions.cs +++ b/Source/OpenTK/OpenAL/EfxFunctions.cs @@ -139,8 +139,8 @@ namespace OpenTK.OpenAL Imported_alEffecti(eid,param,value); } - /// (Helper) internally calls alEffecti(eid,Enums.EfxEffecti.EffectType,(int) type) - /// Effect id. + /// (Helper) Selects the Effect type used by this Effect handle. + /// Effect id returned from a successful call to Efx.GenEffects. /// Effect type. [CLSCompliant(false)] public void BindEffect( uint eid,Enums.EfxEffectType type ) @@ -612,6 +612,15 @@ namespace OpenTK.OpenAL Imported_alAuxiliaryEffectSloti(asid,param,value); } + /// (Helper) Attaches an Effect to an Auxiliary Effect Slot. + /// The slot handle to attach the Effect to. + /// The Effect handle that is being attached. + [CLSCompliant(false)] + public void BindEffectToAuxiliarySlot( uint auxiliaryeffectslot,uint effect ) + { + AuxiliaryEffectSlot(auxiliaryeffectslot,Enums.EfxAuxiliaryi.EffectslotEffect,(int) effect); + } + #endregion alAuxiliaryEffectSloti #region alAuxiliaryEffectSlotf diff --git a/Source/OpenTK/OpenAL/History.txt b/Source/OpenTK/OpenAL/History.txt index d52aec68..ee1cf0ef 100644 --- a/Source/OpenTK/OpenAL/History.txt +++ b/Source/OpenTK/OpenAL/History.txt @@ -22,8 +22,7 @@ Efx: Functions not imported: alEffectiv, alGetEffectiv alFilteriv, alFilterfv, alGetFilteriv, alGetFilterfv alAuxiliaryEffectSlotiv, alAuxiliaryEffectSlotfv, alGetAuxiliaryEffectSlotiv, alGetAuxiliaryEffectSlotfv - -- Added AL.Null for convenience when working with C Manuals. + - Added Function AL.GetErrorString() - Added overloads for requesting/deleting a single buffer/source at a time. - Refactored -i -fv -3f functions to be overloads e.g AL.GetSource, AL.GetListener @@ -35,13 +34,15 @@ Alpha v0.9 -added alEffectfv and alGetEffectfv -ported samples from SDK +Alpha v0.95 +-full cleanup of AL class documentation +-added *.Bind* helpers. Todo for beta: - Identify: AL_FILTER_FIRST_PARAMETER, AL_FILTER_LAST_PARAMETER AL_EFFECT_FIRST_PARAMETER, AL_EFFECT_LAST_PARAMETER -- AL.BindBuffer helper function ala GL.BindBuffer? (Wraps AL.Source, better consistency) -- change all "name" into "handle" to avoid confusion? +- replace EaxEfx reverbs with Efx reverbs. Todo for final: - Enums themselves require summaries (do after some more serious tests) \ No newline at end of file