alexey.lysiuk
9d49e33a80
- cleaned POSIX compiler arguments for libraries
...
Removed omission of frame pointers as it makes crash reports much less useful
Modified warning flags to hide annoying reports for external code
2020-01-05 21:08:01 +01:00
alexey.lysiuk
4c099300ca
- implemented str(n)icmp function definitions via CMake macro
2020-01-05 21:07:58 +01:00
alexey.lysiuk
aa8438cb45
- applied fast math flags to C and C++ files
...
Avoid copy-paste using CMake macro
# Conflicts:
# CMakeLists.txt
# libraries/glslang/OGLCompilersDLL/CMakeLists.txt
# libraries/glslang/glslang/CMakeLists.txt
# libraries/glslang/spirv/CMakeLists.txt
2020-01-05 21:07:36 +01:00
alexey.lysiuk
49b8bedc86
- fixed: soundfont selection for FluidSynth was ignored
2020-01-05 21:06:42 +01:00
alexey.lysiuk
696426c8e4
- fixed: mode argument was ignored by utf8_fopen() on POSIX platforms
2020-01-05 21:06:39 +01:00
alexey.lysiuk
a4930f9d8b
- restored ability to link with thirdparty sound libraries explicitly
...
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
2020-01-05 21:06:37 +01:00
Christoph Oelckers
89d7330ba9
- cleanup of the sound init/exit code.
...
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.
2020-01-05 21:04:09 +01:00
drfrag
731e11bd88
- Add libdl to ZMusic for linux targets, hope this fixes linking.
2020-01-05 14:44:54 +01:00
alexey.lysiuk
0c86fad217
- fixed build issues with POSIX targets
2020-01-05 14:44:01 +01:00
Christoph Oelckers
0888b0b0e7
- fixed the CDDA check to not catch all RIFF files.
2020-01-05 14:39:11 +01:00
Christoph Oelckers
7bd8abc074
- fixed crash with non-looping music ending.
...
In this case it was the song terminating the stream, with the new setup the main music code has to do this itself.
2020-01-05 14:39:09 +01:00
Christoph Oelckers
1616bc93a7
- fixed compilation on Windows.
...
# Conflicts:
# libraries/zmusic/musicformats/win32/i_cd.cpp
# Conflicts:
# libraries/zmusic/musicformats/win32/i_cd.cpp
2020-01-05 14:39:08 +01:00
Christoph Oelckers
ee4bf9670e
- renamed a few functions in the public interface of ZMusic.
2020-01-05 14:39:03 +01:00
Christoph Oelckers
16212e946b
- moved the music loader code to ZMusic.
...
This was the final piece of code reorganization.
What's left is cleaning up the interface.
2020-01-05 14:39:01 +01:00
Christoph Oelckers
09fe55d462
- cleanup of the remaining music code in the main project
...
# Conflicts:
# src/menu/menudef.cpp
# src/scripting/vmthunks.cpp
# Conflicts:
# src/p_acs.cpp
2020-01-05 14:39:00 +01:00
Christoph Oelckers
d7db010217
- 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.
# Conflicts:
# src/CMakeLists.txt
2020-01-05 14:38:27 +01:00
Christoph Oelckers
01de5a071b
- moved the main music classes to ZMusic
...
What's left is the CD-Audio playback and some global functions.
# Conflicts:
# src/CMakeLists.txt
2020-01-05 14:02:12 +01:00
Christoph Oelckers
cf16dc510a
- fixed compilation with XCode and silenced several warnings
2020-01-05 13:38:07 +01:00
Christoph Oelckers
768a7bdd18
- hooked up a few more CVARs and other values the music backend needs to know about and moved the MusInfo base class into zmusic.
...
# Conflicts:
# src/sound/musicformats/music_midistream.cpp
2020-01-05 13:37:50 +01:00
Christoph Oelckers
08d2ac0eee
- 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
2020-01-05 12:56:39 +01:00
Christoph Oelckers
e76f590df8
- moved all configuration code to zmusic project.
...
The CVARs are now just getting forwarded without any own logic.
2020-01-05 12:56:30 +01:00
Christoph Oelckers
5d73f09ebf
- first state of music configuration refactor.
...
# Conflicts:
# src/sound/music/midi_cvars.cpp
2020-01-05 12:56:28 +01:00
Christoph Oelckers
eccff92420
- moved MIDI format detection and source creation into zmusic project.
2020-01-05 12:33:48 +01:00
Christoph Oelckers
4db555626f
- configuration key enums. Not used yet.
2020-01-05 12:32:50 +01:00
Christoph Oelckers
531a5a8857
- moved the stream sources to zmusic project.
...
# Conflicts:
# src/CMakeLists.txt
2020-01-05 12:32:47 +01:00
Christoph Oelckers
09993ca39b
- removed ZDoom dependencies from music_libsndfile.cpp
...
# Conflicts:
# src/sound/musicformats/music_libsndfile.cpp
2020-01-05 12:32:43 +01:00
Christoph Oelckers
f3f2ec5cb1
- 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.
# Conflicts:
# src/CMakeLists.txt
# Conflicts:
# libraries/zmusic/decoder/mpg123_decoder.cpp
# libraries/zmusic/decoder/sndfile_decoder.cpp
# src/CMakeLists.txt
2020-01-05 12:29:15 +01:00
Christoph Oelckers
3837cf8f0f
- ... and the raw OPL format.
2020-01-05 11:53:04 +01:00
Christoph Oelckers
e3d9c6a19e
- dependency cleanup in music_dumb.cpp.
...
# Conflicts:
# src/sound/musicformats/music_dumb.cpp
# Conflicts:
# src/sound/musicformats/music_dumb.cpp
2020-01-05 11:50:07 +01:00
Christoph Oelckers
b5ebe264ab
- 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.)
2020-01-05 11:46:28 +01:00
Christoph Oelckers
c56bf30cc2
- 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.
2020-01-05 11:46:24 +01:00
Christoph Oelckers
5743a56ef4
- 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.
# 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
2020-01-05 11:46:20 +01:00
Christoph Oelckers
c52b516c6f
- more dependency removal, this time from the MIDI devices.
...
# Conflicts:
# src/sound/mididevices/music_win_mididevice.cpp
# Conflicts:
# src/sound/mididevices/music_softsynth_mididevice.cpp
# src/sound/mididevices/music_timidity_mididevice.cpp
# src/sound/mididevices/music_timiditypp_mididevice.cpp
# src/sound/mididevices/music_wavewriter_mididevice.cpp
2020-01-05 02:43:50 +01:00
Christoph Oelckers
30f23738b3
- Timidity++ done.
2020-01-05 02:31:53 +01:00
Christoph Oelckers
67b25d88cf
- moved the last static variable - def_inst_name into the Instruments class.
...
With this the GUS device should be fully reentrant.
2020-01-05 02:31:50 +01:00
Christoph Oelckers
19742b5bc7
- 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.
2020-01-05 02:31:44 +01:00
alexey.lysiuk
850975cbc4
- 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’
2020-01-05 02:17:59 +01:00
Christoph Oelckers
0954942d6a
- fixed compilation on XCode and silenced several warnings in the music code
2020-01-05 02:17:56 +01:00
Christoph Oelckers
f2840d4942
- made the OPL synth backend a separate library.
...
# Conflicts:
# src/CMakeLists.txt
# src/sound/mididevices/music_opl_mididevice.cpp
# Conflicts:
# libraries/oplsynth/OPL3.cpp
# libraries/oplsynth/dosbox/opl.cpp
2020-01-05 02:11:51 +01:00
Christoph Oelckers
cf105c8720
- gave the Timidity error functions better names and hooked up the WildMidi version.
2020-01-05 01:53:54 +01:00
alexey.lysiuk
418ba2372b
- fixed compilation with GCC and Clang
...
libraries/wildmidi/file_io.cpp:68:40: error: use of undeclared identifier 'malloc'
libraries/wildmidi/wildmidi_lib.cpp:672:10: error: use of undeclared identifier 'stricmp'; did you mean 'strcmp'?
libraries/wildmidi/wildmidi_lib.cpp:1011:11: error: use of undeclared identifier 'strnicmp'; did you mean 'strncmp'?
2020-01-05 01:53:48 +01:00
Christoph Oelckers
3b5e8f8011
- made WildMidi a library.
...
# Conflicts:
# src/CMakeLists.txt
# src/sound/musicformats/music_xa.cpp
2020-01-05 01:40:41 +01:00
Christoph Oelckers
33176d3314
- fixed a few Timidity warnings
2020-01-05 01:38:23 +01:00
alexey.lysiuk
071b0d12d6
- fixed compilation with GCC and Clang
...
libraries/timidity/instrum_dls.cpp:1071:18: error: ‘INT_MIN’ was not declared in this scope
libraries/timidity/instrum_font.cpp:37:47: error: ‘stricmp’ was not declared in this scope
libraries/timidity/timidity.cpp:207:32: error: ‘strcmp’ was not declared in this scope
libraries/timidity/timidity.cpp:235:24: error: ‘strcmp’ was not declared in this scope
libraries/timidity/timidity.cpp:310:33: error: ‘strchr’ was not declared in this scope
libraries/timidity/timidity.cpp:515:30: error: ‘strchr’ was not declared in this scope
libraries/timidity/timidity.cpp:602:34: error: ‘memset’ was not declared in this scope
libraries/timidity/timidity.cpp:648:35: error: ‘memcpy’ was not declared in this scope
libraries/timidity/timidity.cpp:753:41: error: ‘memset’ was not declared in this scope
2020-01-05 01:22:16 +01:00
Christoph Oelckers
2ddc9ee1f3
- made the Timidity(GUS) device a separate library.
...
# Conflicts:
# src/CMakeLists.txt
2020-01-05 01:22:14 +01:00
Christoph Oelckers
1b1fabd5c2
- cleanup of the TimidityMIDIDevice(GUS) backend code to eliminate the storage in global variables and to remove the dependencies on core ZDoom code.
...
The organization here is now the same as for the Timidity++ device, i.e. it is the device owning the instruments to give better control over their lifecycle.
# Conflicts:
# src/sound/timidity/instrum_font.cpp
# src/sound/timidity/instrum_sf2.cpp
# src/sound/timidity/mix.cpp
# src/sound/timidity/playmidi.cpp
# src/sound/timidity/resample.cpp
2020-01-05 01:22:10 +01:00
alexey.lysiuk
bb1884bdba
- explicit use of C++11 standard for TiMidity++
...
This fixes compilation with older GCC and Clang
2020-01-05 01:22:08 +01:00
Marisa Kirisame
fd556269d1
Add string.h includes where needed. Fixes Linux builds.
2020-01-05 01:22:04 +01:00
Christoph Oelckers
1208b6306d
- ported the CMake fix to TimidityPlus as well.
2020-01-05 01:22:02 +01:00
Christoph Oelckers
4fccadff7e
- made the Timidity++ backend a library, now that it has no dependencies on GZDoom anymore.
...
# Conflicts:
# src/CMakeLists.txt
# Conflicts:
# src/CMakeLists.txt
2020-01-05 01:21:32 +01:00
alexey.lysiuk
49bccdcaa1
- fixed compilation with GCC and Clang
...
'fatal error: no input files' and '-ffast-math: not found'
2020-01-04 22:59:28 +01:00
Christoph Oelckers
4d2d143422
- gave libopen the same treatment and made it its own subproject
...
# Conflicts:
# src/CMakeLists.txt
# src/sound/mididevices/music_opnmidi_mididevice.cpp
# Conflicts:
# src/sound/mididevices/music_opnmidi_mididevice.cpp
2020-01-04 22:59:26 +01:00
Christoph Oelckers
a4f05f5741
- made libadl its own library subproject.
...
This is to improve compile times because the MSVC compiler tends to become slow with large lists of source files in a single project.
This new project is still our stripped down copy of libadl, not the original, because that project contains a large amount of baggage we do not need.
# Conflicts:
# src/CMakeLists.txt
# Conflicts:
# src/sound/mididevices/music_adlmidi_mididevice.cpp
2020-01-04 22:56:56 +01:00
Christoph Oelckers
040cb17370
- moved third party library projects to a subfolder to reduce size of the root.
...
# Conflicts:
# CMakeLists.txt
# libraries/glslang/OGLCompilersDLL/CMakeLists.txt
# libraries/glslang/OGLCompilersDLL/InitializeDll.cpp
# libraries/glslang/OGLCompilersDLL/InitializeDll.h
# libraries/glslang/glslang/CMakeLists.txt
# libraries/glslang/glslang/GenericCodeGen/CodeGen.cpp
# libraries/glslang/glslang/GenericCodeGen/Link.cpp
# libraries/glslang/glslang/Include/BaseTypes.h
# libraries/glslang/glslang/Include/Common.h
# libraries/glslang/glslang/Include/ConstantUnion.h
# libraries/glslang/glslang/Include/InfoSink.h
# libraries/glslang/glslang/Include/InitializeGlobals.h
# libraries/glslang/glslang/Include/PoolAlloc.h
# libraries/glslang/glslang/Include/ResourceLimits.h
# libraries/glslang/glslang/Include/ShHandle.h
# libraries/glslang/glslang/Include/Types.h
# libraries/glslang/glslang/Include/arrays.h
# libraries/glslang/glslang/Include/intermediate.h
# libraries/glslang/glslang/Include/revision.h
# libraries/glslang/glslang/Include/revision.template
# libraries/glslang/glslang/MachineIndependent/Constant.cpp
# libraries/glslang/glslang/MachineIndependent/InfoSink.cpp
# libraries/glslang/glslang/MachineIndependent/Initialize.cpp
# libraries/glslang/glslang/MachineIndependent/Initialize.h
# libraries/glslang/glslang/MachineIndependent/IntermTraverse.cpp
# libraries/glslang/glslang/MachineIndependent/Intermediate.cpp
# libraries/glslang/glslang/MachineIndependent/LiveTraverser.h
# libraries/glslang/glslang/MachineIndependent/ParseContextBase.cpp
# libraries/glslang/glslang/MachineIndependent/ParseHelper.cpp
# libraries/glslang/glslang/MachineIndependent/ParseHelper.h
# libraries/glslang/glslang/MachineIndependent/PoolAlloc.cpp
# libraries/glslang/glslang/MachineIndependent/RemoveTree.cpp
# libraries/glslang/glslang/MachineIndependent/RemoveTree.h
# libraries/glslang/glslang/MachineIndependent/Scan.cpp
# libraries/glslang/glslang/MachineIndependent/Scan.h
# libraries/glslang/glslang/MachineIndependent/ScanContext.h
# libraries/glslang/glslang/MachineIndependent/ShaderLang.cpp
# libraries/glslang/glslang/MachineIndependent/SymbolTable.cpp
# libraries/glslang/glslang/MachineIndependent/SymbolTable.h
# libraries/glslang/glslang/MachineIndependent/Versions.cpp
# libraries/glslang/glslang/MachineIndependent/Versions.h
# libraries/glslang/glslang/MachineIndependent/attribute.cpp
# libraries/glslang/glslang/MachineIndependent/attribute.h
# libraries/glslang/glslang/MachineIndependent/gl_types.h
# libraries/glslang/glslang/MachineIndependent/glslang.y
# libraries/glslang/glslang/MachineIndependent/glslang_tab.cpp
# libraries/glslang/glslang/MachineIndependent/glslang_tab.cpp.h
# libraries/glslang/glslang/MachineIndependent/intermOut.cpp
# libraries/glslang/glslang/MachineIndependent/iomapper.cpp
# libraries/glslang/glslang/MachineIndependent/iomapper.h
# libraries/glslang/glslang/MachineIndependent/limits.cpp
# libraries/glslang/glslang/MachineIndependent/linkValidate.cpp
# libraries/glslang/glslang/MachineIndependent/localintermediate.h
# libraries/glslang/glslang/MachineIndependent/parseConst.cpp
# libraries/glslang/glslang/MachineIndependent/parseVersions.h
# libraries/glslang/glslang/MachineIndependent/pch.cpp
# libraries/glslang/glslang/MachineIndependent/pch.h
# libraries/glslang/glslang/MachineIndependent/preprocessor/Pp.cpp
# libraries/glslang/glslang/MachineIndependent/preprocessor/PpAtom.cpp
# libraries/glslang/glslang/MachineIndependent/preprocessor/PpContext.cpp
# libraries/glslang/glslang/MachineIndependent/preprocessor/PpContext.h
# libraries/glslang/glslang/MachineIndependent/preprocessor/PpScanner.cpp
# libraries/glslang/glslang/MachineIndependent/preprocessor/PpTokens.cpp
# libraries/glslang/glslang/MachineIndependent/preprocessor/PpTokens.h
# libraries/glslang/glslang/MachineIndependent/propagateNoContraction.cpp
# libraries/glslang/glslang/MachineIndependent/propagateNoContraction.h
# libraries/glslang/glslang/MachineIndependent/reflection.cpp
# libraries/glslang/glslang/MachineIndependent/reflection.h
# libraries/glslang/glslang/OSDependent/Unix/CMakeLists.txt
# libraries/glslang/glslang/OSDependent/Unix/ossource.cpp
# libraries/glslang/glslang/OSDependent/Windows/CMakeLists.txt
# libraries/glslang/glslang/OSDependent/Windows/main.cpp
# libraries/glslang/glslang/OSDependent/Windows/ossource.cpp
# libraries/glslang/glslang/OSDependent/osinclude.h
# libraries/glslang/glslang/Public/ShaderLang.h
# libraries/glslang/glslang/updateGrammar
# libraries/glslang/spirv/CMakeLists.txt
# libraries/glslang/spirv/GLSL.ext.AMD.h
# libraries/glslang/spirv/GLSL.ext.EXT.h
# libraries/glslang/spirv/GLSL.ext.KHR.h
# libraries/glslang/spirv/GLSL.ext.NV.h
# libraries/glslang/spirv/GLSL.std.450.h
# libraries/glslang/spirv/GlslangToSpv.cpp
# libraries/glslang/spirv/GlslangToSpv.h
# libraries/glslang/spirv/InReadableOrder.cpp
# libraries/glslang/spirv/Logger.cpp
# libraries/glslang/spirv/Logger.h
# libraries/glslang/spirv/SPVRemapper.cpp
# libraries/glslang/spirv/SPVRemapper.h
# libraries/glslang/spirv/SpvBuilder.cpp
# libraries/glslang/spirv/SpvBuilder.h
# libraries/glslang/spirv/SpvPostProcess.cpp
# libraries/glslang/spirv/SpvTools.cpp
# libraries/glslang/spirv/SpvTools.h
# libraries/glslang/spirv/bitutils.h
# libraries/glslang/spirv/disassemble.cpp
# libraries/glslang/spirv/disassemble.h
# libraries/glslang/spirv/doc.cpp
# libraries/glslang/spirv/doc.h
# libraries/glslang/spirv/hex_float.h
# libraries/glslang/spirv/spirv.hpp
# libraries/glslang/spirv/spvIR.h
# src/CMakeLists.txt
2020-01-04 21:30:08 +01:00