From: Ketmar Dark Date: Thu, 7 Apr 2016 06:47:27 +0000 (+0300) Subject: cosmetic fix in fmod sound driver X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=c022b6cac8b73bd4e8fb837bd5e50f84bfcd2b66;p=d2df-sdl.git cosmetic fix in fmod sound driver --- diff --git a/src/engine/e_sound_fmod.inc b/src/engine/e_sound_fmod.inc index ceb0c0f..123db2c 100644 --- a/src/engine/e_sound_fmod.inc +++ b/src/engine/e_sound_fmod.inc @@ -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