Exemple #1
0
 public XRamExtension()
 {
   this._valid = false;
   if (!AL.IsExtensionPresent("EAX-RAM"))
     return;
   this.AL_EAX_RAM_SIZE = AL.GetEnumValue("AL_EAX_RAM_SIZE");
   this.AL_EAX_RAM_FREE = AL.GetEnumValue("AL_EAX_RAM_FREE");
   this.AL_STORAGE_AUTOMATIC = AL.GetEnumValue("AL_STORAGE_AUTOMATIC");
   this.AL_STORAGE_HARDWARE = AL.GetEnumValue("AL_STORAGE_HARDWARE");
   this.AL_STORAGE_ACCESSIBLE = AL.GetEnumValue("AL_STORAGE_ACCESSIBLE");
   if (this.AL_EAX_RAM_SIZE == 0 || this.AL_EAX_RAM_FREE == 0 || (this.AL_STORAGE_AUTOMATIC == 0 || this.AL_STORAGE_HARDWARE == 0))
     return;
   if (this.AL_STORAGE_ACCESSIBLE == 0)
     return;
   try
   {
     this.Imported_GetBufferMode = (XRamExtension.Delegate_GetBufferMode) Marshal.GetDelegateForFunctionPointer(AL.GetProcAddress("EAXGetBufferMode"), typeof (XRamExtension.Delegate_GetBufferMode));
     this.Imported_SetBufferMode = (XRamExtension.Delegate_SetBufferMode) Marshal.GetDelegateForFunctionPointer(AL.GetProcAddress("EAXSetBufferMode"), typeof (XRamExtension.Delegate_SetBufferMode));
   }
   catch (Exception ex)
   {
     return;
   }
   this._valid = true;
 }
Exemple #2
0
 public XRamExtension()
 {
     this._valid = false;
     if (!AL.IsExtensionPresent("EAX-RAM"))
     {
         return;
     }
     this.AL_EAX_RAM_SIZE       = AL.GetEnumValue("AL_EAX_RAM_SIZE");
     this.AL_EAX_RAM_FREE       = AL.GetEnumValue("AL_EAX_RAM_FREE");
     this.AL_STORAGE_AUTOMATIC  = AL.GetEnumValue("AL_STORAGE_AUTOMATIC");
     this.AL_STORAGE_HARDWARE   = AL.GetEnumValue("AL_STORAGE_HARDWARE");
     this.AL_STORAGE_ACCESSIBLE = AL.GetEnumValue("AL_STORAGE_ACCESSIBLE");
     if (this.AL_EAX_RAM_SIZE == 0 || this.AL_EAX_RAM_FREE == 0 || (this.AL_STORAGE_AUTOMATIC == 0 || this.AL_STORAGE_HARDWARE == 0))
     {
         return;
     }
     if (this.AL_STORAGE_ACCESSIBLE == 0)
     {
         return;
     }
     try
     {
         this.Imported_GetBufferMode = (XRamExtension.Delegate_GetBufferMode)Marshal.GetDelegateForFunctionPointer(AL.GetProcAddress("EAXGetBufferMode"), typeof(XRamExtension.Delegate_GetBufferMode));
         this.Imported_SetBufferMode = (XRamExtension.Delegate_SetBufferMode)Marshal.GetDelegateForFunctionPointer(AL.GetProcAddress("EAXSetBufferMode"), typeof(XRamExtension.Delegate_SetBufferMode));
     }
     catch (Exception ex)
     {
         return;
     }
     this._valid = true;
 }