ref: 00f6a3e75bc1f396606c50e9b041befcd3a4aaea
parent: 2db2e37b148b01e53e10631ecfbfd437a06b4391
author: Simon Howard <fraggle@soulsphere.org>
date: Tue Oct 23 19:43:52 EDT 2018
music: Factor out music packs to separate file. As described in #440, it's counterintuitive that music packs can only be used if the music device is configured as native MIDI mode. Factor the music pack part of `i_sdlmusic.c` out into a new file, `i_musicpack.c`, separating the code that deals specifically with music packs from the code that deals with MIDIs. This is easily expressible as a `music_module_t`, doesn't result in a huge amount of duplicated code, and only requires some minor hooks in `i_sound.c` to support the overrides. As an added bonus, the code in both files ends up being significantly simpler as a result of the refactoring. This fixes #440 and fixes #528.