- stop sound in all paths of the ANM player.

Fixes #36.
This commit is contained in:
Christoph Oelckers 2020-07-26 18:02:24 +02:00
parent 775eabcd3d
commit c8cde7fb3b

View file

@ -44,6 +44,7 @@
#include "animtexture.h" #include "animtexture.h"
#include "gamestate.h" #include "gamestate.h"
#include "menu.h" #include "menu.h"
#include "raze_sound.h"
#include "movie/playmve.h" #include "movie/playmve.h"
@ -119,6 +120,7 @@ public:
if (curframe > 4 && totalclock > frametime + 60) if (curframe > 4 && totalclock > frametime + 60)
{ {
Printf("WARNING: slowdown in video playback, aborting\n"); Printf("WARNING: slowdown in video playback, aborting\n");
soundEngine->StopAllChannels();
return -1; return -1;
} }
@ -126,6 +128,7 @@ public:
{ {
twod->ClearScreen(); twod->ClearScreen();
DrawTexture(twod, animtex.GetFrame(), 0, 0, DTA_FullscreenEx, 3, DTA_Masked, false, TAG_DONE); DrawTexture(twod, animtex.GetFrame(), 0, 0, DTA_FullscreenEx, 3, DTA_Masked, false, TAG_DONE);
if (skiprequest) soundEngine->StopAllChannels();
return skiprequest? -1 : 1; return skiprequest? -1 : 1;
} }