diff --git a/src/s_sound.cpp b/src/s_sound.cpp index 070ba56584..e34edf1177 100644 --- a/src/s_sound.cpp +++ b/src/s_sound.cpp @@ -2331,8 +2331,6 @@ bool S_StartMusic (const char *m_id) // specified, it will only be played if the specified CD is in a drive. //========================================================================== -TArray musiccache; - bool S_ChangeMusic (const char *musicname, int order, bool looping, bool force) { if (!force && PlayList) @@ -2456,31 +2454,11 @@ bool S_ChangeMusic (const char *musicname, int order, bool looping, bool force) } if (handle == NULL) { - if (!Wads.IsUncompressedFile(lumpnum)) + if (Wads.LumpLength (lumpnum) == 0) { - // We must cache the music data and use it from memory. - - // shut down old music before reallocating and overwriting the cache! - S_StopMusic (true); - - length = Wads.LumpLength (lumpnum); - if (length == 0) - { - return false; - } - musiccache.Resize(length); - Wads.ReadLump(lumpnum, &musiccache[0]); - - reader = new MemoryReader((const char*)&musiccache[0], musiccache.Size()); - } - else - { - if (Wads.LumpLength (lumpnum) == 0) - { - return false; - } - reader = Wads.ReopenLumpNum(lumpnum); + return false; } + reader = Wads.ReopenLumpNum(lumpnum); } } else