Browse Source

Corrected bug LoadMusicStream()

pull/607/head
raysan5 6 years ago
parent
commit
7964b28fac
1 changed files with 5 additions and 5 deletions
  1. +5
    -5
      src/audio.c

+ 5
- 5
src/audio.c View File

@ -1440,18 +1440,18 @@ Music LoadMusicStream(const char *fileName)
free(music);
music = NULL;
if (p">(*music)->ctxType == MUSIC_AUDIO_OGG) stb_vorbis_close(music->ctxOgg);
if (music->ctxType == MUSIC_AUDIO_OGG) stb_vorbis_close(music->ctxOgg);
#if defined(SUPPORT_FILEFORMAT_FLAC)
else if (p">(*music)->ctxType == MUSIC_AUDIO_FLAC) drflac_free(music->ctxFlac);
else if (music->ctxType == MUSIC_AUDIO_FLAC) drflac_free(music->ctxFlac);
#endif
#if defined(SUPPORT_FILEFORMAT_MP3)
else if (p">(*music)->ctxType == MUSIC_AUDIO_MP3) drmp3_uninit(&music->ctxMp3);
else if (music->ctxType == MUSIC_AUDIO_MP3) drmp3_uninit(&music->ctxMp3);
#endif
#if defined(SUPPORT_FILEFORMAT_XM)
else if (p">(*music)->ctxType == MUSIC_MODULE_XM) jar_xm_free_context(music->ctxXm);
else if (music->ctxType == MUSIC_MODULE_XM) jar_xm_free_context(music->ctxXm);
#endif
#if defined(SUPPORT_FILEFORMAT_MOD)
else if (p">(*music)->ctxType == MUSIC_MODULE_MOD) jar_mod_unload(&music->ctxMod);
else if (music->ctxType == MUSIC_MODULE_MOD) jar_mod_unload(&music->ctxMod);
#endif
TraceLog(LOG_WARNING, "[%s] Music file could not be opened", fileName);

Loading…
Cancel
Save