diff --git a/CMakeLists.txt b/CMakeLists.txt index 6dc631d682..5647cf0d3a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -385,6 +385,7 @@ endif() set( LZMA_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/libraries/lzma/C" ) set( ADL_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/libraries/adlmidi" ) set( OPN_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/libraries/opnmidi" ) +set( TIMIDITYPP_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/libraries/timidityplus" ) if( NOT CMAKE_CROSSCOMPILING ) if( NOT CROSS_EXPORTS ) @@ -408,6 +409,7 @@ add_subdirectory( libraries/dumb ) add_subdirectory( libraries/gdtoa ) add_subdirectory( libraries/adlmidi ) add_subdirectory( libraries/opnmidi ) +add_subdirectory( libraries/timidityplus ) add_subdirectory( wadsrc ) add_subdirectory( wadsrc_bm ) add_subdirectory( wadsrc_lights ) diff --git a/libraries/timidityplus/CMakeLists.txt b/libraries/timidityplus/CMakeLists.txt new file mode 100644 index 0000000000..8ef8983d9b --- /dev/null +++ b/libraries/timidityplus/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required( VERSION 2.8.7 ) + +make_release_only() + +if( ZD_CMAKE_COMPILER_IS_GNUC_COMPATIBLE ) + set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wno-unused-parameter -fomit-frame-pointer" ) +endif() + +set (CMAKE_C_FLAGS ${CMAKE_C_FLAGS} ${ZD_FASTMATH_FLAG}) + +include_directories( timiditypp ) + +add_library( timidityplus STATIC + fft4g.cpp + reverb.cpp + common.cpp + configfile.cpp + effect.cpp + filter.cpp + freq.cpp + instrum.cpp + mblock.cpp + mix.cpp + playmidi.cpp + quantity.cpp + readmidic.cpp + recache.cpp + resample.cpp + sbkconv.cpp + sffile.cpp + sfitem.cpp + smplfile.cpp + sndfont.cpp + tables.cpp + ) +target_link_libraries( timidityplus ) diff --git a/src/sound/timiditypp/common.cpp b/libraries/timidityplus/common.cpp similarity index 99% rename from src/sound/timiditypp/common.cpp rename to libraries/timidityplus/common.cpp index 87ce4d13ec..f4908b93a3 100644 --- a/src/sound/timiditypp/common.cpp +++ b/libraries/timidityplus/common.cpp @@ -23,6 +23,7 @@ #include #include +#include #include #include diff --git a/src/sound/timiditypp/configfile.cpp b/libraries/timidityplus/configfile.cpp similarity index 100% rename from src/sound/timiditypp/configfile.cpp rename to libraries/timidityplus/configfile.cpp diff --git a/src/sound/timiditypp/effect.cpp b/libraries/timidityplus/effect.cpp similarity index 100% rename from src/sound/timiditypp/effect.cpp rename to libraries/timidityplus/effect.cpp diff --git a/src/sound/timiditypp/fft4g.cpp b/libraries/timidityplus/fft4g.cpp similarity index 100% rename from src/sound/timiditypp/fft4g.cpp rename to libraries/timidityplus/fft4g.cpp diff --git a/src/sound/timiditypp/filter.cpp b/libraries/timidityplus/filter.cpp similarity index 100% rename from src/sound/timiditypp/filter.cpp rename to libraries/timidityplus/filter.cpp diff --git a/src/sound/timiditypp/freq.cpp b/libraries/timidityplus/freq.cpp similarity index 100% rename from src/sound/timiditypp/freq.cpp rename to libraries/timidityplus/freq.cpp diff --git a/src/sound/timiditypp/instrum.cpp b/libraries/timidityplus/instrum.cpp similarity index 100% rename from src/sound/timiditypp/instrum.cpp rename to libraries/timidityplus/instrum.cpp diff --git a/src/sound/timiditypp/mblock.cpp b/libraries/timidityplus/mblock.cpp similarity index 100% rename from src/sound/timiditypp/mblock.cpp rename to libraries/timidityplus/mblock.cpp diff --git a/src/sound/timiditypp/mix.cpp b/libraries/timidityplus/mix.cpp similarity index 100% rename from src/sound/timiditypp/mix.cpp rename to libraries/timidityplus/mix.cpp diff --git a/src/sound/timiditypp/playmidi.cpp b/libraries/timidityplus/playmidi.cpp similarity index 99% rename from src/sound/timiditypp/playmidi.cpp rename to libraries/timidityplus/playmidi.cpp index 4f0297f66b..f87b3c2bb0 100644 --- a/src/sound/timiditypp/playmidi.cpp +++ b/libraries/timidityplus/playmidi.cpp @@ -22,6 +22,7 @@ #include #include +#include #include #include diff --git a/src/sound/timiditypp/quantity.cpp b/libraries/timidityplus/quantity.cpp similarity index 100% rename from src/sound/timiditypp/quantity.cpp rename to libraries/timidityplus/quantity.cpp diff --git a/src/sound/timiditypp/readmidic.cpp b/libraries/timidityplus/readmidic.cpp similarity index 100% rename from src/sound/timiditypp/readmidic.cpp rename to libraries/timidityplus/readmidic.cpp diff --git a/src/sound/timiditypp/recache.cpp b/libraries/timidityplus/recache.cpp similarity index 100% rename from src/sound/timiditypp/recache.cpp rename to libraries/timidityplus/recache.cpp diff --git a/src/sound/timiditypp/resample.cpp b/libraries/timidityplus/resample.cpp similarity index 100% rename from src/sound/timiditypp/resample.cpp rename to libraries/timidityplus/resample.cpp diff --git a/src/sound/timiditypp/reverb.cpp b/libraries/timidityplus/reverb.cpp similarity index 100% rename from src/sound/timiditypp/reverb.cpp rename to libraries/timidityplus/reverb.cpp diff --git a/src/sound/timiditypp/sbkconv.cpp b/libraries/timidityplus/sbkconv.cpp similarity index 100% rename from src/sound/timiditypp/sbkconv.cpp rename to libraries/timidityplus/sbkconv.cpp diff --git a/src/sound/timiditypp/sffile.cpp b/libraries/timidityplus/sffile.cpp similarity index 100% rename from src/sound/timiditypp/sffile.cpp rename to libraries/timidityplus/sffile.cpp diff --git a/src/sound/timiditypp/sfitem.cpp b/libraries/timidityplus/sfitem.cpp similarity index 100% rename from src/sound/timiditypp/sfitem.cpp rename to libraries/timidityplus/sfitem.cpp diff --git a/src/sound/timiditypp/smplfile.cpp b/libraries/timidityplus/smplfile.cpp similarity index 100% rename from src/sound/timiditypp/smplfile.cpp rename to libraries/timidityplus/smplfile.cpp diff --git a/src/sound/timiditypp/sndfont.cpp b/libraries/timidityplus/sndfont.cpp similarity index 100% rename from src/sound/timiditypp/sndfont.cpp rename to libraries/timidityplus/sndfont.cpp diff --git a/src/sound/timiditypp/tables.cpp b/libraries/timidityplus/tables.cpp similarity index 100% rename from src/sound/timiditypp/tables.cpp rename to libraries/timidityplus/tables.cpp diff --git a/src/sound/timiditypp/common.h b/libraries/timidityplus/timiditypp/common.h similarity index 100% rename from src/sound/timiditypp/common.h rename to libraries/timidityplus/timiditypp/common.h diff --git a/src/sound/timiditypp/controls.h b/libraries/timidityplus/timiditypp/controls.h similarity index 100% rename from src/sound/timiditypp/controls.h rename to libraries/timidityplus/timiditypp/controls.h diff --git a/src/sound/timiditypp/effect.h b/libraries/timidityplus/timiditypp/effect.h similarity index 100% rename from src/sound/timiditypp/effect.h rename to libraries/timidityplus/timiditypp/effect.h diff --git a/src/sound/timiditypp/fft4g.h b/libraries/timidityplus/timiditypp/fft4g.h similarity index 100% rename from src/sound/timiditypp/fft4g.h rename to libraries/timidityplus/timiditypp/fft4g.h diff --git a/src/sound/timiditypp/filter.h b/libraries/timidityplus/timiditypp/filter.h similarity index 100% rename from src/sound/timiditypp/filter.h rename to libraries/timidityplus/timiditypp/filter.h diff --git a/src/sound/timiditypp/freq.h b/libraries/timidityplus/timiditypp/freq.h similarity index 100% rename from src/sound/timiditypp/freq.h rename to libraries/timidityplus/timiditypp/freq.h diff --git a/src/sound/timiditypp/instrum.h b/libraries/timidityplus/timiditypp/instrum.h similarity index 100% rename from src/sound/timiditypp/instrum.h rename to libraries/timidityplus/timiditypp/instrum.h diff --git a/src/sound/timiditypp/mblock.h b/libraries/timidityplus/timiditypp/mblock.h similarity index 100% rename from src/sound/timiditypp/mblock.h rename to libraries/timidityplus/timiditypp/mblock.h diff --git a/src/sound/timiditypp/mix.h b/libraries/timidityplus/timiditypp/mix.h similarity index 100% rename from src/sound/timiditypp/mix.h rename to libraries/timidityplus/timiditypp/mix.h diff --git a/src/sound/timiditypp/optcode.h b/libraries/timidityplus/timiditypp/optcode.h similarity index 100% rename from src/sound/timiditypp/optcode.h rename to libraries/timidityplus/timiditypp/optcode.h diff --git a/src/sound/timiditypp/playmidi.h b/libraries/timidityplus/timiditypp/playmidi.h similarity index 100% rename from src/sound/timiditypp/playmidi.h rename to libraries/timidityplus/timiditypp/playmidi.h diff --git a/src/sound/timiditypp/quantity.h b/libraries/timidityplus/timiditypp/quantity.h similarity index 100% rename from src/sound/timiditypp/quantity.h rename to libraries/timidityplus/timiditypp/quantity.h diff --git a/src/sound/timiditypp/recache.h b/libraries/timidityplus/timiditypp/recache.h similarity index 100% rename from src/sound/timiditypp/recache.h rename to libraries/timidityplus/timiditypp/recache.h diff --git a/src/sound/timiditypp/resample.h b/libraries/timidityplus/timiditypp/resample.h similarity index 100% rename from src/sound/timiditypp/resample.h rename to libraries/timidityplus/timiditypp/resample.h diff --git a/src/sound/timiditypp/reverb.h b/libraries/timidityplus/timiditypp/reverb.h similarity index 100% rename from src/sound/timiditypp/reverb.h rename to libraries/timidityplus/timiditypp/reverb.h diff --git a/src/sound/timiditypp/sffile.h b/libraries/timidityplus/timiditypp/sffile.h similarity index 100% rename from src/sound/timiditypp/sffile.h rename to libraries/timidityplus/timiditypp/sffile.h diff --git a/src/sound/timiditypp/sfitem.h b/libraries/timidityplus/timiditypp/sfitem.h similarity index 100% rename from src/sound/timiditypp/sfitem.h rename to libraries/timidityplus/timiditypp/sfitem.h diff --git a/src/sound/timiditypp/sflayer.h b/libraries/timidityplus/timiditypp/sflayer.h similarity index 100% rename from src/sound/timiditypp/sflayer.h rename to libraries/timidityplus/timiditypp/sflayer.h diff --git a/src/sound/timiditypp/sysdep.h b/libraries/timidityplus/timiditypp/sysdep.h similarity index 100% rename from src/sound/timiditypp/sysdep.h rename to libraries/timidityplus/timiditypp/sysdep.h diff --git a/src/sound/timiditypp/t_swap.h b/libraries/timidityplus/timiditypp/t_swap.h similarity index 100% rename from src/sound/timiditypp/t_swap.h rename to libraries/timidityplus/timiditypp/t_swap.h diff --git a/src/sound/timiditypp/tables.h b/libraries/timidityplus/timiditypp/tables.h similarity index 100% rename from src/sound/timiditypp/tables.h rename to libraries/timidityplus/timiditypp/tables.h diff --git a/src/sound/timiditypp/timidity.h b/libraries/timidityplus/timiditypp/timidity.h similarity index 100% rename from src/sound/timiditypp/timidity.h rename to libraries/timidityplus/timiditypp/timidity.h diff --git a/src/sound/timiditypp/timidity_file.h b/libraries/timidityplus/timiditypp/timidity_file.h similarity index 100% rename from src/sound/timiditypp/timidity_file.h rename to libraries/timidityplus/timiditypp/timidity_file.h diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 4b7dc1951b..136f73002b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -468,7 +468,7 @@ set( ZDOOM_LIBS ${ZDOOM_LIBS} "${ZLIB_LIBRARIES}" "${JPEG_LIBRARIES}" "${BZIP2_L if (HAVE_VULKAN) set( ZDOOM_LIBS ${ZDOOM_LIBS} "glslang" "SPIRV" "OGLCompiler") endif() -include_directories( "${ZLIB_INCLUDE_DIR}" "${BZIP2_INCLUDE_DIR}" "${LZMA_INCLUDE_DIR}" "${JPEG_INCLUDE_DIR}" "${GME_INCLUDE_DIR}" "${ADL_INCLUDE_DIR}" "${OPN_INCLUDE_DIR}" ) +include_directories( "${ZLIB_INCLUDE_DIR}" "${BZIP2_INCLUDE_DIR}" "${LZMA_INCLUDE_DIR}" "${JPEG_INCLUDE_DIR}" "${GME_INCLUDE_DIR}" "${ADL_INCLUDE_DIR}" "${OPN_INCLUDE_DIR}" "${TIMIDITYPP_INCLUDE_DIR}" ) if( ${HAVE_VM_JIT} ) add_definitions( -DHAVE_VM_JIT ) @@ -694,7 +694,6 @@ file( GLOB HEADER_FILES sound/oplsynth/dosbox/*.h sound/thirdparty/*.h sound/timidity/*.h - sound/timiditypp/*.h sound/wildmidi/*.h rendering/*.h rendering/2d/*.h @@ -846,8 +845,6 @@ set( FASTMATH_SOURCES sound/music/music_midi_base.cpp sound/backend/oalsound.cpp sound/backend/sndfile_decoder.cpp - sound/timiditypp/fft4g.cpp - sound/timiditypp/reverb.cpp gamedata/textures/hires/hqnx/init.cpp gamedata/textures/hires/hqnx/hq2x.cpp gamedata/textures/hires/hqnx/hq3x.cpp @@ -1232,25 +1229,6 @@ set (PCH_SOURCES sound/timidity/playmidi.cpp sound/timidity/resample.cpp sound/timidity/timidity.cpp - sound/timiditypp/common.cpp - sound/timiditypp/configfile.cpp - sound/timiditypp/effect.cpp - sound/timiditypp/filter.cpp - sound/timiditypp/freq.cpp - sound/timiditypp/instrum.cpp - sound/timiditypp/mblock.cpp - sound/timiditypp/mix.cpp - sound/timiditypp/playmidi.cpp - sound/timiditypp/quantity.cpp - sound/timiditypp/readmidic.cpp - sound/timiditypp/recache.cpp - sound/timiditypp/resample.cpp - sound/timiditypp/sbkconv.cpp - sound/timiditypp/sffile.cpp - sound/timiditypp/sfitem.cpp - sound/timiditypp/smplfile.cpp - sound/timiditypp/sndfont.cpp - sound/timiditypp/tables.cpp sound/wildmidi/file_io.cpp sound/wildmidi/gus_pat.cpp sound/wildmidi/reverb.cpp @@ -1352,7 +1330,7 @@ if( UNIX ) endif() endif() -target_link_libraries( zdoom ${ZDOOM_LIBS} gdtoa dumb lzma adl opn ) +target_link_libraries( zdoom ${ZDOOM_LIBS} gdtoa dumb lzma adl opn timidityplus ) include_directories( . g_statusbar @@ -1484,7 +1462,6 @@ source_group("Audio Files\\Backend" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_ source_group("Audio Files\\OPL Synth" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/sound/oplsynth/.+") source_group("Audio Files\\OPL Synth\\DOSBox" FILES sound/oplsynth/dosbox/opl.cpp sound/oplsynth/dosbox/opl.h) source_group("Audio Files\\Timidity" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/sound/timidity/.+") -source_group("Audio Files\\Timiditypp" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/sound/timiditypp/.+") source_group("Audio Files\\WildMidi" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/sound/wildmidi/.+") source_group("Audio Files\\MIDI Devices" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/sound/mididevices/.+") source_group("Audio Files\\MIDI Sources" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/sound/midisources/.+")