DYN_SNDFILE=NO and DYN_MPG123=NO were ignored while DYN_FLUIDSYNTH=NO broke compilation
These options should be applied to ZMusic target instead of the main executable
As a bonus, it's now possible to build GZDoom without FluidSynth
Since this made heavy use of Windows type, those were duplicated to avoid rewriting the entire interface.
This split at least reduces the amount of code needed to refactor for making the screens work on other platforms than Windows.
# Conflicts:
# src/CMakeLists.txt
Now there is only one single entry point for both, instead of previously 2 entry and 4 exit points.
This also eliminates the explicit shutdown of ZMusic. Timidity++'s two buffers have been put in containers that self-destruct on shutdown and calling dumb_exit is not necessary because the only feature requiring it is not used by any code in the music library.
Instead of trying a homegrown way to avoid recursive exceptions, let's do it with the defined procedure C++ has for this case: call std::terminate.
This allowed removing some old hackery inherited from Boom and will now hopefully allow sanitizing the exit procedure to the point that it can be done without depending on exit handlers.
# Conflicts:
# src/files_decompress.cpp
# Conflicts:
# src/d_main.cpp
The only difference here were the size values on Windows but for this initial call they have been useless for a long time. When this code was written the console buffer still had a fixed width that needed to be set before adding any text.
FMod had MP3/Ogg playback integrated right into itself, and the OpenAL backend tried to replicate this functionality.
This functionality, however, has been removed over two years ago when FMod started breaking things more and more, it was only this backing implementation that was left in.
This was the last player class.
This code was also cleaned up for non-Windows systems where CD Audio is not implemented.
Instead of providing an empty implementation, all related code is now explicitly deactivated.
# Conflicts:
# src/CMakeLists.txt
It is now being handled by the controlling code.
While of no benefit for GZDoom itself, this finally allows to separate the entire music code into a separate, engine independent project that merely provides streamed music data when not playing on a hardware device (WinMM Midi or CD Audio.)
The tight coupling of the music code with the sound backend made this nearly impossible before
The way CDDA was treated as an afterthought made handling of stream songs somewhat problematic, because the state could be unclear.
CDDA is an easily identifiable format so it should be tested first.
Since this gets used by both the sound backend and the music code it needs to be in a place accessible to both.
# Conflicts:
# src/CMakeLists.txt
# Conflicts:
# libraries/zmusic/decoder/mpg123_decoder.cpp
# libraries/zmusic/decoder/sndfile_decoder.cpp
# src/CMakeLists.txt