Christoph Oelckers
02507effe8
- moved the music loader code to ZMusic.
...
This was the final piece of code reorganization.
What's left is cleaning up the interface.
2019-09-30 02:35:47 +02:00
Christoph Oelckers
c42deda6e6
- cleanup of the remaining music code in the main project
2019-09-30 02:31:12 +02:00
Christoph Oelckers
d0cf21654e
- moved the CD Audio code to ZMusic, too.
...
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.
2019-09-30 02:22:53 +02:00
Christoph Oelckers
352365189f
- moved the main music classes to ZMusic
...
What's left is the CD-Audio playback and some global functions.
2019-09-30 02:10:00 +02:00
Christoph Oelckers
6bfa1bf692
- fixed compilation with XCode and silenced several warnings
2019-09-30 01:51:53 +02:00
Christoph Oelckers
2c33e47988
- hooked up a few more CVARs and other values the music backend needs to know about and moved the MusInfo base class into zmusic.
2019-09-30 01:34:16 +02:00
Christoph Oelckers
7c27cd0c57
- moved the sound system's sound stream for the music out of the song objects.
...
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
2019-09-30 00:02:31 +02:00
Christoph Oelckers
c7b379483e
- reordering code a bit to see where the stream must be started.
2019-09-29 22:54:13 +02:00
Christoph Oelckers
d06ec56c2e
- a bit of cleanup - moving internal class declarations into the sources.
...
Now i_musicinterns.h doesn't bleed the entire implementation everywhere anymore.
2019-09-29 22:32:42 +02:00
Christoph Oelckers
b9b706e951
- renamed the configuration file.
2019-09-29 22:03:14 +02:00
Christoph Oelckers
44a6b6e87c
- moved all configuration code to zmusic project.
...
The CVARs are now just getting forwarded without any own logic.
2019-09-29 22:01:19 +02:00
Christoph Oelckers
b7b57b904d
- first state of music configuration refactor.
2019-09-29 20:01:57 +02:00
Christoph Oelckers
ab016be6b9
- did a bit of reordering on I_RegisterSong.
...
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.
2019-09-29 15:10:06 +02:00
Christoph Oelckers
6d7b6fb9fd
- moved MIDI format detection and source creation into zmusic project.
2019-09-29 14:47:10 +02:00
Christoph Oelckers
54b994e863
- configuration key enums. Not used yet.
2019-09-29 14:13:01 +02:00
Christoph Oelckers
859028b35a
- moved the stream sources to zmusic project.
2019-09-29 13:33:09 +02:00
Christoph Oelckers
247346e821
- removed ZDoom dependencies from music_libsndfile.cpp
2019-09-29 13:06:40 +02:00
Christoph Oelckers
cdf2a17c5a
- moved the sound decoding code to the zmusic project.
...
Since this gets used by both the sound backend and the music code it needs to be in a place accessible to both.
2019-09-29 12:48:12 +02:00
Christoph Oelckers
b883d27a1f
- XA, too.
2019-09-29 01:44:59 +02:00
Christoph Oelckers
dbabc3c0f6
- ... and the raw OPL format.
2019-09-29 01:31:42 +02:00
Christoph Oelckers
dbb4539f4f
- gave music_gme.cpp the treatment.
2019-09-29 01:00:15 +02:00
Christoph Oelckers
5eed3dab59
- dependency cleanup in music_dumb.cpp.
2019-09-29 00:41:13 +02:00
Christoph Oelckers
7468c0f36d
- consolidated the different file access interfaces in the backends into one shared version.
...
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.)
2019-09-28 23:17:16 +02:00
Christoph Oelckers
d94b63b486
- uncoupled the stream sources from the low level implementation. The entire setup had the stream sources depend on the SoundStream class, severely limiting reusability. This was changed that there is one SoundStream class that uses the StreamSources as mere data source that has no knowledge and no connection to the underlying system, similar to how the MIDI system works. With this there are only 3 top level music classes left - MIDIStreamer, StreamSong and CDSong.
...
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.
2019-09-28 21:04:41 +02:00
Christoph Oelckers
cfe89ef6e6
- created a new zmusic library which will eventually contain all the music playback code.
...
Currently all it contains are the MIDI sources and the MIDI devices, the rest needs to be reworked first.
2019-09-28 18:32:25 +02:00
Christoph Oelckers
fc6eba0c26
- more dependency removal, this time from the MIDI devices.
2019-09-28 16:50:00 +02:00
Christoph Oelckers
820cbcc689
- removed all dependencies on ZDoom code from the MIDI sources (including TArray and FileReader.)
2019-09-28 13:59:46 +02:00
Christoph Oelckers
d8a1005c76
- fixed typo.
2019-09-28 10:04:09 +02:00
Christoph Oelckers
123ed9d01d
- moved the stream handling out of the MIDI device into the MIDIStreamer class.
...
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.
2019-09-28 10:00:22 +02:00
Christoph Oelckers
67169b80e5
- split out the MIDIDevice implementation into its own source file.
2019-09-28 07:47:50 +02:00
Christoph Oelckers
d13766f2ee
- fixed a merge error.
2019-09-28 07:47:10 +02:00
Christoph Oelckers
c5f2578ff5
Merge branch 'midi_work_2'
2019-09-28 00:11:54 +02:00
Christoph Oelckers
61bc25d781
- WildMidi also done.
2019-09-28 00:10:39 +02:00
Christoph Oelckers
890db1fbf9
- Timidity++ done.
2019-09-27 22:19:00 +02:00
Christoph Oelckers
9aecabc887
- moved the last static variable - def_inst_name into the Instruments class.
...
With this the GUS device should be fully reentrant.
2019-09-27 20:40:19 +02:00
Christoph Oelckers
1cb668e895
- fixed the GUS MIDI device.
...
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.
2019-09-27 20:08:03 +02:00
Christoph Oelckers
98a4a77f6b
- took make_release_only off those subprojects which contain code that still need debugging on occasion.
...
For these performance on debug builds doesn't really matter anyway.
2019-09-27 19:43:32 +02:00
alexey.lysiuk
b5e1656c8e
- fixed compilation on Linux
...
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’
2019-09-27 10:21:11 +03:00
Christoph Oelckers
ed7b73d8cb
- work on GUS MIDI device plus some cleanup
...
This is not tested yet!
2019-09-27 02:31:27 +02:00
Christoph Oelckers
b3b870d67e
- Gave OPN device the same treatment
...
Also made some improvements to the interface.
2019-09-27 01:51:05 +02:00
Christoph Oelckers
315e15c7f0
- fixed compilation on XCode and silenced several warnings in the music code
2019-09-27 01:42:56 +02:00
Christoph Oelckers
621945905f
- same treatment for the OPL Midi player.
2019-09-27 01:01:52 +02:00
Christoph Oelckers
d67fcd3887
- missed an 'else'.
2019-09-27 00:23:49 +02:00
Christoph Oelckers
647abf040b
- cleared FluidSynthMIDIDevice of most ZDoom dependencies.
2019-09-27 00:16:32 +02:00
Christoph Oelckers
8d2c67fe95
- more work on music code
...
- 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.
2019-09-26 22:30:07 +02:00
Christoph Oelckers
9b0529b8a3
- removed most dependencies on ZDoom code in ADL Midi device.
2019-09-26 21:29:06 +02:00
Christoph Oelckers
d3df422031
- made the OPL synth backend a separate library.
2019-09-26 20:06:39 +02:00
Christoph Oelckers
b085ac3efb
- cleaned up the dependencies of the OPL interface layer.
...
This also removes the OPL dumper because I wasn't able to get any non-broken output from it and have no desire to fix such a niche feature.
2019-09-26 19:33:28 +02:00
Christoph Oelckers
17eac1c57b
- removed all ZDoom dependencies from the OPL backend code.
2019-09-26 18:15:23 +02:00
Christoph Oelckers
2aa03e8e8a
- removed the global current_opl_core variable and pass the needed info as function parameters
...
because using global variables for this is really bad style!
This also removes the unused OPLMUSDumper class.
2019-09-26 17:40:39 +02:00