anchor.diff:      SoundGain:single; //aka "Global volume"
       WarriorSoundCount: array[15..24, TSoundToPlay] of byte;
       procedure LoadSoundsDAT();
  +    procedure CheckOpenALError();
       function GetWarriorSoundFile(aUnitType:TUnitType; aSound:TSoundToPlay; aNumber:byte; aLocale:string=''):string;
     public
       constructor Create(aLocale:string; aVolume:single);
  
positive.code:     exit;
    end;
  
    ErrCode := alcGetError(Device);
    if ErrCode <> ALC_NO_ERROR then begin
      fLog.AddToLog('OpenAL warning. There is OpenAL error '+inttostr(ErrCode)+' raised. Sound will be disabled.');
      Application.MessageBox(PChar('There is OpenAL error '+inttostr(ErrCode)+' raised. Sound will be disabled.'),'OpenAL error', MB_OK + MB_ICONEXCLAMATION);
      IsSoundInitialized := false;
      exit;
    end;
  
    //Set attenuation model
    alDistanceModel(AL_LINEAR_DISTANCE_CLAMPED);
  
negative.code:     AlutExit();
    end;
    Inherited;
  end;
  
  
  procedure TSoundLib.CheckOpenALError();
  begin
    ErrCode := alcGetError(Device);
    if ErrCode <> ALC_NO_ERROR then begin
      fLog.AddToLog('OpenAL warning. There is OpenAL error '+inttostr(ErrCode)+' raised. Sound will be disabled.');
      Application.MessageBox(PChar('There is OpenAL error '+inttostr(ErrCode)+' raised. Sound will be disabled.'),'OpenAL error', MB_OK + MB_ICONEXCLAMATION);
      IsSoundInitialized := false;
    end;
  end;
  
  
  