Commit graph

16737 commits

Author SHA1 Message Date
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
f6eedb737b - same treatment for the OPL Midi player.
# Conflicts:
#	src/sound/mididevices/music_opl_mididevice.cpp
2020-01-05 02:17:53 +01:00
Christoph Oelckers
9585ca5984 - missed an 'else'. 2020-01-05 02:16:33 +01:00
Christoph Oelckers
4aca10e062 - cleared FluidSynthMIDIDevice of most ZDoom dependencies.
# Conflicts:
#	src/sound/mididevices/music_fluidsynth_mididevice.cpp

# Conflicts:
#	src/sound/mididevices/music_fluidsynth_mididevice.cpp
2020-01-05 02:16:30 +01:00
Christoph Oelckers
726f65e91b - 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.
2020-01-05 02:14:14 +01:00
drfrag
8b6af8726e Revert "- added dynamic loading of FluidSynth 2.x"
This reverts commit 399bc4cffa9401b6ea4b88ff6d2206e80f835efc.
2020-01-05 02:13:44 +01:00
Christoph Oelckers
9437bcda64 - removed most dependencies on ZDoom code in ADL Midi device. 2020-01-05 02:11:52 +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
a63d90034b - 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.

# Conflicts:
#	src/sound/mididevices/music_opldumper_mididevice.cpp
2020-01-05 02:11:49 +01:00
Christoph Oelckers
01624eddf2 - removed all ZDoom dependencies from the OPL backend code.
# Conflicts:
#	src/sound/oplsynth/opl_mus_player.cpp
2020-01-05 02:11:03 +01:00
Christoph Oelckers
d212c84392 - 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.
2020-01-05 02:02:01 +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
2428cc4b1e - fixed compilation with Apple Clang as well
src/utility/basictypes.h:39:23: error: unknown type name 'size_t'; did you mean 'time_t'?
2020-01-05 01:53:50 +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
166e390ad9 - changed MIDI sources so that they do not have to include i_musicinterns.h anymore.
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
2020-01-05 01:53:45 +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
1816c17ffd - fixed WildMidi. 2020-01-05 01:40:38 +01:00
Christoph Oelckers
f76f3d0e0a - refactoring of WildMidi to have proper instrument management
Not tested yet, it compiles but may not work as-is.

# Conflicts:
#	src/sound/wildmidi/file_io.cpp
2020-01-05 01:40:34 +01:00
Christoph Oelckers
33176d3314 - fixed a few Timidity warnings 2020-01-05 01:38:23 +01:00
Christoph Oelckers
00048ddf7e - started cleanup work on WildMidi code.
# Conflicts:
#	src/sound/mididevices/music_wildmidi_mididevice.cpp

# Conflicts:
#	src/sound/mididevices/music_wildmidi_mididevice.cpp
2020-01-05 01:38:19 +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
f59aa69d95 - cleaned up the includes in timidity.cpp.
# Conflicts:
#	src/sound/timidity/timidity.cpp
2020-01-05 01:22:12 +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
Christoph Oelckers
8542d73994 - removed some ZDoomd dependencies from Timidity(GUS) backend
* use std::string instead of FString
* replaced the single use of clamp with std::min/std::max.
* copied MAKE_ID macro into the source.
* use snprintf instead of mysnprintf
* use std::runtime_error instead of I_Error to abort on failed memory allocations.

# Conflicts:
#	src/sound/timidity/common.cpp

# Conflicts:
#	src/sound/timidity/common.cpp
#	src/sound/timidity/instrum.cpp
#	src/sound/timidity/instrum_dls.cpp
2020-01-05 01:22:06 +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
Christoph Oelckers
5a3b544ba6 - handled the final piece where Timidity++ had a direct dependency on GZDoom - the error logging function.
This is npw a function pointer so that a simple stdout printout can be used as default, but allows to override it.
Also added the missing timidity_file.h header.

# Conflicts:
#	src/sound/timiditypp/common.cpp
2020-01-04 23:41:22 +01:00
Christoph Oelckers
ebdab4fd23 - moved the CVars out of the Timidity++ backend. 2020-01-04 23:39:51 +01:00
Christoph Oelckers
2dd6c14865 - implemented an abstract sound font reader interface for Timidity++.
The only dependency left on the main GZDoom code are the CVars, which will be dealt with next.

# Conflicts:
#	src/sound/mididevices/music_timiditypp_mididevice.cpp
2020-01-04 23:39:48 +01:00
Christoph Oelckers
9d5f4969e7 - thinned out the FSoundFontReader interface a bit more by moving the file open code into the FSoundFontReader class itself. 2020-01-04 23:39:45 +01:00
Christoph Oelckers
e968ef9ded - moved the instrument set maintenance out of the Timidity++ library into the player class.
This removes the dependency on the sound font manager from the low level library, reducing the direct dependencies to FileReader and SoundFontReader.
2020-01-04 23:39:43 +01:00
Christoph Oelckers
64e0b151fb - removed a few dependencies of the Timidity++ code from the main GZDoom code base.
The big issues, i.e. FileReader and SoundFontReader still need to be handled to make this a standalone library.

# Conflicts:
#	src/sound/timiditypp/configfile.cpp
2020-01-04 23:39:39 +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
drfrag
bcbf914f5b - Added I_Error prototypes to doomerrors.h. 2020-01-04 21:44:07 +01:00
Christoph Oelckers
c05e3ebf31 Made several classes trivially copyable,
Many had leftover non-default constructors/ assignment operators, and some were initialized, even though the initialized data was never used.

In case of FCycler this even caused a default setting to be overwritten when used inside FDynamicLight.

# Conflicts:
#	src/g_shared/a_dynlight.cpp
#	src/sound/s_sndseq.cpp
2020-01-04 21:32:10 +01:00
Christoph Oelckers
f09e887a69 - removed redundant include. 2020-01-04 21:32:07 +01:00
alexey.lysiuk
a095ffde39 - fixed compilation of Linux targets
src/../libraries/gdtoa/gdtoa.h:67:19: fatal error: arith.h: No such file or directory
# Conflicts:
#	src/CMakeLists.txt
2020-01-04 21:32:06 +01:00
Christoph Oelckers
1556e6620c - move sound files to sound folder.
# Conflicts:
#	src/CMakeLists.txt
2020-01-04 21:32:04 +01:00
Christoph Oelckers
81d54959af - sorted sound backend code into subdirectories.
# Conflicts:
#	src/CMakeLists.txt
2020-01-04 21:32:02 +01:00
Christoph Oelckers
d9168aeeff - deleted unused mus2midi.cpp file.
# Conflicts:
#	src/sound/i_music.cpp
2020-01-04 21:31:59 +01:00
Christoph Oelckers
7fe9c285b8 - removed fixrtext tool.
This is no longer needed, because it was used to create self-modifiable code from assembly source, which no longer exists.
2020-01-04 21:30:10 +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
drfrag
bdcb9fcbcd - Version 3.84. 2019-12-16 12:18:17 +01:00
Christoph Oelckers
91cc264fd4 - disable runtime buffer security check in release build.
This has a minor but measurable effect on performance because it gets inserted into every function which uses a local stack space structure.
2019-12-13 00:04:52 +01:00