Merge pull request #15 from kichikuou/voice

Fix voice playback issue in Daibanchou
This commit is contained in:
Nunuhara Cabbage
2021-02-23 16:44:08 -08:00
committed by GitHub
+2 -1
View File
@@ -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);