Example #1
0
 public void BindFilterToSource(int sourceId, int filterId)
 {
     AL.Source(sourceId, ALSourcei.EfxDirectFilter, filterId);
 }
Example #2
0
 public void BindSourceToAuxiliarySlot(int SounceId, int slot, int slotnumber, int filter)
 {
     AL.Source(SounceId, ALSourcei.EfxAuxilarySendFilter, slot, slotnumber, filter);
 }
Example #3
0
 public 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;
 }
Example #4
0
        public 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;
        }
Example #5
0
 public unsafe static void SourceQueueBuffer(int sourceId, int buffer)
 {
     AL.SourceQueueBuffers(sourceId, 1, &buffer);
 }