mirror of
https://github.com/nunuhara/xsystem4.git
synced 2026-09-30 10:58:15 +03:00
Fix voice playback issue in Daibanchou
This fixes an issue where wav_unload_slot() stops playing ALL channels if slot->channel == -1.
This commit is contained in:
+2
-1
@@ -264,7 +264,8 @@ static bool bgm_load_music(int no, struct bgm_slot *slot)
|
||||
static void wav_unload_slot(struct wav_slot *slot)
|
||||
{
|
||||
if (slot->chunk) {
|
||||
Mix_HaltChannel(slot->channel);
|
||||
if (slot->channel >= 0)
|
||||
Mix_HaltChannel(slot->channel);
|
||||
Mix_FreeChunk(slot->chunk);
|
||||
slot->chunk = NULL;
|
||||
archive_free_data(slot->dfile);
|
||||
|
||||
Reference in New Issue
Block a user