DEADSOFTWARE

cosmetic fix in fmod sound driver
authorKetmar Dark <ketmar@ketmar.no-ip.org>
Thu, 7 Apr 2016 06:47:27 +0000 (09:47 +0300)
committerKetmar Dark <ketmar@ketmar.no-ip.org>
Thu, 7 Apr 2016 06:47:27 +0000 (09:47 +0300)
src/engine/e_sound_fmod.inc

index ceb0c0fc5f4b3d3c9caacbae0dd5028517315c9e..123db2c84975599d4e71bd124b1cee77371b1fb4 100644 (file)
@@ -720,17 +720,15 @@ var
   res: FMOD_RESULT;
 
 begin
+  Result := False;
+  if FID = NO_SOUND_ID then Exit;
+
   if e_SoundsArray[FID].nRefs >= gMaxSimSounds then
   begin
     Result := True;
     Exit;
   end;
 
-  Result := False;
-
-  if FID = NO_SOUND_ID then
-    Exit;
-
   res := FMOD_System_PlaySound(F_System, FMOD_CHANNEL_FREE,
            e_SoundsArray[FID].Sound, False, FChannel);
   if res <> FMOD_OK then