Currently all it contains are the MIDI sources and the MIDI devices, the rest needs to be reworked first.
# Conflicts:
# libraries/zmusic/i_module.cpp
# libraries/zmusic/i_module.h
# src/CMakeLists.txt
# src/i_module.cpp
# src/i_module.h
# src/sound/music/midi_cvars.cpp
# src/utility/i_module.cpp
# src/utility/i_module.h
# Conflicts:
# src/CMakeLists.txt
# src/sound/musicformats/music_opl.cpp
They were already clean of unwanted external references, but including this file made it hard to keep it that way.
This also moves a few useful definitions around to less 'dirty' headers.
# Conflicts:
# src/rendering/swrenderer/textures/warptexture.cpp
# Conflicts:
# src/doomtype.h
# src/sound/midisources/midisource.cpp
# src/sound/midisources/midisource_smf.cpp
# src/sound/midisources/midisource_xmi.cpp
The idea here is to decouple the actual reader creation from the code using them so that, for example, the Open function can decide if it wants to open the file regularly or memory mapped and return different readers as deemed useful. For that to work the exposed object needs to be an abstract wrapper so that this can be done without having to use pointers and all the drawbacks coming from that.
So far put to use in a few parts of the music code so the general functionality could be tested.