if (!S_LoadSound (sfx, true))
continue;
+ // if the channel is paused
+ if (ch->flags & CHANNELFLAG_PAUSED)
+ {
+ size_t pausedtime;
+
+ pausedtime = end - paintedtime;
+ ch->lastptime += pausedtime;
+ ch->end += pausedtime;
+ continue;
+ }
+
// if the sound hasn't been painted last time, update his position
if (ch->lastptime < paintedtime)
{
if (stop_paint)
{
- if (ch->sfx->fetcher->end != NULL)
- ch->sfx->fetcher->end (ch);
- ch->sfx = NULL;
+ S_StopChannel (ch - channels);
break;
}
}