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.
This was getting a bit unwieldy. The include path setup is not perfect yet, that's work for later.
(It's about time we're getting C++20 with modules so that this include path madness can be put to an end.)
Also made the decode_vorbis function in DUMB a function pointer so that the library does not depend on high level code and can just ignore the vorbis case if no supported.
src/sound/music/i_musicinterns.h:111:7: error: no template named 'shared_ptr' in namespace 'std'
src/sound/music/i_musicinterns.h:133:7: error: no template named 'shared_ptr' in namespace 'std'
src/sound/music/i_musicinterns.h:152:7: error: no template named 'shared_ptr' in namespace 'std'
This isn't the final location but this means that the device is merely a data provider, with the sole exception of the Win32 MIDI device whose unwieldy usage requirements unfortunately dictate much of the needed interface here.
The sound font reader may not be deleted because its ownership is transferred to the instrument set.
The gus_patchdir variable was not transferred to the config struct.
libraries/oplsynth/oplio.cpp:59:32: error: ‘memset’ was not declared in this scope
src/sound/mididevices/midi_cvars.cpp:43:31: error: expected initializer before ‘GetSystemDirectoryA’
- renamed the FluidSetting functions to ChangeSetting so that they can be used as a generic means to change music player options without overloading the virtual function table for each minor thing.
- pass Printf as a parameter to the MIDI renderer to uncouple it from the main GZDoom code.
- throw exceptions when setting up the renderer fails so that this can be handled consistently for all construction errors here.
- delete FluidSynth handles before the constructor aborts.