Commit graph

16360 commits

Author SHA1 Message Date
alexey.lysiuk
fe76293f2d - handled differences of values returned by fluid_settings_...() functions
FluidSynth 1.x: these functions return 1 on success and 0 otherwise
FluidSynth 2.x: these functions return  FLUID_OK (0) on success and FLUID_FAILED (-1) otherwise
2020-01-05 21:09:31 +01:00
alexey.lysiuk
d7f0da033d - fixed setting of FluidSynth reverb and chorus 2020-01-05 21:09:29 +01:00
alexey.lysiuk
922eb28ca2 - fixed compilation with old versions of Xcode
libraries/zmusic/mididevices/music_fluidsynth_mididevice.cpp:628:3: error: use of undeclared identifier 'free'
2020-01-05 21:08:03 +01:00
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
alexey.lysiuk
875a136b34 - fixed compilation of Cocoa backend
src/posix/cocoa/st_start.mm:63:7: error: redefinition of 'FBasicStartupScreen'
2020-01-05 21:04:42 +01:00
Christoph Oelckers
26c435c69e - split up st_start.cpp into one file with the Windows interface code and a second one which only contains platform independent code.
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
2020-01-05 21:04:39 +01:00
Christoph Oelckers
ba071d7044 - eliminate a little bit of redundancy. 2020-01-05 21:04:12 +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
Christoph Oelckers
55831a264a - some reformatting on exit code, mainly to make searching for the content easier.
# Conflicts:
#	libraries/asmjit/asmjit/core/compiler.h
#	libraries/glslang/spirv/SpvBuilder.h
#	src/posix/sdl/hardware.cpp
#	src/rendering/v_video.cpp
#	src/win32/hardware.cpp
#	src/win32/i_main.cpp
2020-01-05 21:03:41 +01:00
Christoph Oelckers
fcfff6f6f6 - sanitized exit code a bit
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
2020-01-05 21:03:07 +01:00
Christoph Oelckers
1f15bc5b0d - moced I_DetectOS call into D_DoomMain
This requires the console and was the reason for this strange setup.

# Conflicts:
#	src/posix/cocoa/i_main.mm
2020-01-05 21:00:19 +01:00
Christoph Oelckers
5293b8b281 - moved the initial C_InitConsole call into D_DoomMain
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.
2020-01-05 21:00:16 +01:00
Christoph Oelckers
f0d68efb88 - also put the Windows system specific exit handlers into atexit's list
Again, these have no place in the game's own uninit code.
2020-01-05 21:00:15 +01:00
Christoph Oelckers
818302e02f - put SDL_Quit into the atexit queue instead of atterm
System exit procedures should not go in there.
2020-01-05 21:00:12 +01:00
Christoph Oelckers
c272315ca3 - new exception class for quitting the game
This will eventually replace the atexit mess, right now it isn't used.

# Conflicts:
#	src/doomerrors.h

# Conflicts:
#	src/doomerrors.h
2020-01-05 20:58:39 +01:00
Christoph Oelckers
62141910a4 - copied the restart cleanup code into its own function
# Conflicts:
#	src/d_main.cpp

# Conflicts:
#	src/d_main.cpp
2020-01-05 20:56:30 +01:00
drfrag
ce31c46d60 Revert "Use signal handler to invoke call_terms() before exit when possible"
This reverts commit 457dc8b5a9.
2020-01-05 19:56:24 +01:00
drfrag
2bf731cfa9 Revert "- Made VMFrameStack GlobalVMStack a non thread_local variable for MinGW since that helps to prevent crashes on exit."
This reverts commit 429bd5d843.
2020-01-05 19:55:15 +01:00
drfrag
b78978fa7b Revert "- Addressed crash on exit with MinGW. This is a hack and i've reported it as a bug in the MinGW C runtime."
This reverts commit 0e25e40deb.
2020-01-05 19:54:54 +01:00
drfrag
fce7af81af - Try to fix compilation on POSIX targets, i mean for real compilers thanks again to the broken VS preprocessor. 2020-01-05 19:44:18 +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
44f668c6d9 - added a mapping table from DOS-IBM-437 to Unicode
This is for future use, added now so that it won't get lost.
2020-01-05 14:43:59 +01:00
Christoph Oelckers
ed0e671281 - added missing return to the GENMIDI loader. 2020-01-05 14:39:14 +01:00
Braden Obrzut
04ca5946d9 - Document limitation of TArray and silence warnings about non-trivial types being trivially moved 2020-01-05 14:39:12 +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
alexey.lysiuk
0d3e78f748 - disabled code signing in Xcode by default
It’s impossible to build GZDoom without valid code signing identity with Xcode 11 using a project

# Conflicts:
#	src/CMakeLists.txt
2020-01-05 14:39:06 +01:00
Christoph Oelckers
555b847323 - removed the remains of the FModEx-style stream implementation
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.
2020-01-05 14:39:04 +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
fce866054e - reordering code a bit to see where the stream must be started. 2020-01-05 12:56:37 +01:00
Christoph Oelckers
e3bb9332d0 - a bit of cleanup - moving internal class declarations into the sources.
Now i_musicinterns.h doesn't bleed the entire implementation everywhere anymore.
2020-01-05 12:56:35 +01:00
Christoph Oelckers
0f7886326d - renamed the configuration file. 2020-01-05 12:56:33 +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
d44d3b353d - 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.
2020-01-05 12:33:51 +01:00
Christoph Oelckers
eccff92420 - moved MIDI format detection and source creation into zmusic project. 2020-01-05 12:33:48 +01:00