internal void BindFilterToSource(int sourceId, int filterId) { AL.Source(sourceId, ALSourcei.EfxDirectFilter, filterId); }
internal void BindSourceToAuxiliarySlot(int SourceId, int slot, int slotnumber, int filter) { AL.Source(SourceId, ALSourcei.EfxAuxilarySendFilter, slot, slotnumber, filter); }
internal XRamExtension() { IsInitialized = false; if (!AL.IsExtensionPresent("EAX-RAM")) { return; } RamSize = AL.GetEnumValue("AL_EAX_RAM_SIZE"); RamFree = AL.GetEnumValue("AL_EAX_RAM_FREE"); StorageAuto = AL.GetEnumValue("AL_STORAGE_AUTOMATIC"); StorageHardware = AL.GetEnumValue("AL_STORAGE_HARDWARE"); StorageAccessible = AL.GetEnumValue("AL_STORAGE_ACCESSIBLE"); if (RamSize == 0 || RamFree == 0 || StorageAuto == 0 || StorageHardware == 0 || StorageAccessible == 0) { return; } try { setBufferMode = (XRamExtension.SetBufferModeDelegate)Marshal.GetDelegateForFunctionPointer(AL.GetProcAddress("EAXSetBufferMode"), typeof(XRamExtension.SetBufferModeDelegate)); } catch (Exception) { return; } IsInitialized = true; }
internal EffectsExtension() { IsInitialized = false; if (!Alc.IsExtensionPresent(device, "ALC_EXT_EFX")) { return; } alGenEffects = (alGenEffectsDelegate)Marshal.GetDelegateForFunctionPointer(AL.GetProcAddress("alGenEffects"), typeof(alGenEffectsDelegate)); alDeleteEffects = (alDeleteEffectsDelegate)Marshal.GetDelegateForFunctionPointer(AL.GetProcAddress("alDeleteEffects"), typeof(alDeleteEffectsDelegate)); alEffectf = (alEffectfDelegate)Marshal.GetDelegateForFunctionPointer(AL.GetProcAddress("alEffectf"), typeof(alEffectfDelegate)); alEffecti = (alEffectiDelegate)Marshal.GetDelegateForFunctionPointer(AL.GetProcAddress("alEffecti"), typeof(alEffectiDelegate)); alGenAuxiliaryEffectSlots = (alGenAuxiliaryEffectSlotsDelegate)Marshal.GetDelegateForFunctionPointer(AL.GetProcAddress("alGenAuxiliaryEffectSlots"), typeof(alGenAuxiliaryEffectSlotsDelegate)); alDeleteAuxiliaryEffectSlots = (alDeleteAuxiliaryEffectSlotsDelegate)Marshal.GetDelegateForFunctionPointer(AL.GetProcAddress("alDeleteAuxiliaryEffectSlots"), typeof(alDeleteAuxiliaryEffectSlotsDelegate)); alAuxiliaryEffectSloti = (alAuxiliaryEffectSlotiDelegate)Marshal.GetDelegateForFunctionPointer(AL.GetProcAddress("alAuxiliaryEffectSloti"), typeof(alAuxiliaryEffectSlotiDelegate)); alAuxiliaryEffectSlotf = (alAuxiliaryEffectSlotfDelegate)Marshal.GetDelegateForFunctionPointer(AL.GetProcAddress("alAuxiliaryEffectSlotf"), typeof(alAuxiliaryEffectSlotfDelegate)); alGenFilters = (alGenFiltersDelegate)Marshal.GetDelegateForFunctionPointer(AL.GetProcAddress("alGenFilters"), typeof(alGenFiltersDelegate)); alFilteri = (alFilteriDelegate)Marshal.GetDelegateForFunctionPointer(AL.GetProcAddress("alFilteri"), typeof(alFilteriDelegate)); alFilterf = (alFilterfDelegate)Marshal.GetDelegateForFunctionPointer(AL.GetProcAddress("alFilterf"), typeof(alFilterfDelegate)); alDeleteFilters = (alDeleteFiltersDelegate)Marshal.GetDelegateForFunctionPointer(AL.GetProcAddress("alDeleteFilters"), typeof(alDeleteFiltersDelegate)); IsInitialized = true; }
internal unsafe static void SourceQueueBuffer(int sourceId, int buffer) { AL.SourceQueueBuffers(sourceId, 1, &buffer); }