Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
fmodaudio [2019/08/13 09:15] – [Remarks] adminfmodaudio [2020/01/09 14:20] – [Remarks] admin
Line 211: Line 211:
 ===== Remarks ===== ===== Remarks =====
 It is not allowed to release FMOD interfaces when the TGorillaFMODAudioManager component, especially the IGorillaFMODSystem interface inside of it, is already destroyed. It is not allowed to release FMOD interfaces when the TGorillaFMODAudioManager component, especially the IGorillaFMODSystem interface inside of it, is already destroyed.
-In this case you will receive an AccessViolation, because FMOD can not destroy the instance anymore.+In this case you will receive an AccessViolation, because FMOD can not destroy the internal handle anymore.
  
 **WRONG:** **WRONG:**
Line 225: Line 225:
 finally finally
   FreeAndNil(LFMOD);   FreeAndNil(LFMOD);
-  LSound := nil;+  LSound := nil; // <<< WRONG!
 end; end;
 </file> </file>
Line 240: Line 240:
   LSound := LFMOD.LoadSoundFromFile(Common_MediaPathRaw('drumloop.wav'));   LSound := LFMOD.LoadSoundFromFile(Common_MediaPathRaw('drumloop.wav'));
 finally finally
-  LSound := nil; // !!!+  LSound := nil; // !!! CORRECT!
   FreeAndNil(LFMOD);   FreeAndNil(LFMOD);
 end; end;
 </file> </file>
 +
 +Next step: [[assetsmanager|Assets Manager]]