From 7962bf189eaadb53c63c7c3689ad7969d94276d4 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 24 Sep 2019 23:43:44 +0200 Subject: [PATCH] - made the Timidity(GUS) device a separate library. --- CMakeLists.txt | 2 + {src/sound => libraries}/timidity/CHANGES | 0 libraries/timidity/CMakeLists.txt | 28 +++++++++++ {src/sound => libraries}/timidity/COPYING | 0 {src/sound => libraries}/timidity/FAQ | 0 {src/sound => libraries}/timidity/README | 0 {src/sound => libraries}/timidity/common.cpp | 2 +- {src/sound => libraries}/timidity/instrum.cpp | 9 ++-- .../timidity/instrum_dls.cpp | 9 ---- .../timidity/instrum_font.cpp | 0 .../timidity/instrum_sf2.cpp | 50 +++++++++---------- {src/sound => libraries}/timidity/mix.cpp | 0 .../sound => libraries}/timidity/playmidi.cpp | 1 + .../sound => libraries}/timidity/resample.cpp | 0 .../sound => libraries}/timidity/timidity.cpp | 10 ++-- .../timidity}/timidity/common.h | 7 +++ .../timidity}/timidity/dls1.h | 0 .../timidity}/timidity/dls2.h | 0 .../timidity}/timidity/gf1patch.h | 0 .../timidity}/timidity/instrum.h | 2 +- .../timidity}/timidity/playmidi.h | 0 .../timidity}/timidity/sf2.h | 3 +- .../timidity}/timidity/t_swap.h | 0 .../timidity}/timidity/timidity.h | 0 .../timidity}/timidity/timidity_file.h | 0 libraries/timidityplus/CMakeLists.txt | 3 ++ src/CMakeLists.txt | 16 +----- 27 files changed, 83 insertions(+), 59 deletions(-) rename {src/sound => libraries}/timidity/CHANGES (100%) create mode 100644 libraries/timidity/CMakeLists.txt rename {src/sound => libraries}/timidity/COPYING (100%) rename {src/sound => libraries}/timidity/FAQ (100%) rename {src/sound => libraries}/timidity/README (100%) rename {src/sound => libraries}/timidity/common.cpp (98%) rename {src/sound => libraries}/timidity/instrum.cpp (98%) rename {src/sound => libraries}/timidity/instrum_dls.cpp (99%) rename {src/sound => libraries}/timidity/instrum_font.cpp (100%) rename {src/sound => libraries}/timidity/instrum_sf2.cpp (96%) rename {src/sound => libraries}/timidity/mix.cpp (100%) rename {src/sound => libraries}/timidity/playmidi.cpp (99%) rename {src/sound => libraries}/timidity/resample.cpp (100%) rename {src/sound => libraries}/timidity/timidity.cpp (98%) rename {src/sound => libraries/timidity}/timidity/common.h (95%) rename {src/sound => libraries/timidity}/timidity/dls1.h (100%) rename {src/sound => libraries/timidity}/timidity/dls2.h (100%) rename {src/sound => libraries/timidity}/timidity/gf1patch.h (100%) rename {src/sound => libraries/timidity}/timidity/instrum.h (99%) rename {src/sound => libraries/timidity}/timidity/playmidi.h (100%) rename {src/sound => libraries/timidity}/timidity/sf2.h (99%) rename {src/sound => libraries/timidity}/timidity/t_swap.h (100%) rename {src/sound => libraries/timidity}/timidity/timidity.h (100%) rename {src/sound => libraries/timidity}/timidity/timidity_file.h (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5647cf0d3..e0f216c63 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -386,6 +386,7 @@ 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" ) +set( TIMIDITY_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/libraries/timidity" ) if( NOT CMAKE_CROSSCOMPILING ) if( NOT CROSS_EXPORTS ) @@ -409,6 +410,7 @@ add_subdirectory( libraries/dumb ) add_subdirectory( libraries/gdtoa ) add_subdirectory( libraries/adlmidi ) add_subdirectory( libraries/opnmidi ) +add_subdirectory( libraries/timidity ) add_subdirectory( libraries/timidityplus ) add_subdirectory( wadsrc ) add_subdirectory( wadsrc_bm ) diff --git a/src/sound/timidity/CHANGES b/libraries/timidity/CHANGES similarity index 100% rename from src/sound/timidity/CHANGES rename to libraries/timidity/CHANGES diff --git a/libraries/timidity/CMakeLists.txt b/libraries/timidity/CMakeLists.txt new file mode 100644 index 000000000..84dc7d286 --- /dev/null +++ b/libraries/timidity/CMakeLists.txt @@ -0,0 +1,28 @@ +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" ) + set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11" ) +endif() + +set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ZD_FASTMATH_FLAG}") + +include_directories( timidity ) + +file( GLOB HEADER_FILES + timidity/*.h + ) +add_library( timidity STATIC + common.cpp + instrum.cpp + instrum_dls.cpp + instrum_font.cpp + instrum_sf2.cpp + mix.cpp + playmidi.cpp + resample.cpp + timidity.cpp + ) +target_link_libraries( timidity ) diff --git a/src/sound/timidity/COPYING b/libraries/timidity/COPYING similarity index 100% rename from src/sound/timidity/COPYING rename to libraries/timidity/COPYING diff --git a/src/sound/timidity/FAQ b/libraries/timidity/FAQ similarity index 100% rename from src/sound/timidity/FAQ rename to libraries/timidity/FAQ diff --git a/src/sound/timidity/README b/libraries/timidity/README similarity index 100% rename from src/sound/timidity/README rename to libraries/timidity/README diff --git a/src/sound/timidity/common.cpp b/libraries/timidity/common.cpp similarity index 98% rename from src/sound/timidity/common.cpp rename to libraries/timidity/common.cpp index 64687842a..6e77611a3 100644 --- a/src/sound/timidity/common.cpp +++ b/libraries/timidity/common.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include namespace Timidity diff --git a/src/sound/timidity/instrum.cpp b/libraries/timidity/instrum.cpp similarity index 98% rename from src/sound/timidity/instrum.cpp rename to libraries/timidity/instrum.cpp index 90db5ae3c..c2b3e6210 100644 --- a/src/sound/timidity/instrum.cpp +++ b/libraries/timidity/instrum.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include "timidity.h" #include "gf1patch.h" @@ -598,11 +599,11 @@ int Renderer::fill_bank(int dr, int b) { if (bank->tone[i].fontbank >= 0) { - ip = load_instrument_font(bank->tone[i].name, dr, b, i); + ip = load_instrument_font(bank->tone[i].name.c_str(), dr, b, i); } else { - ip = load_instrument(bank->tone[i].name, + ip = load_instrument(bank->tone[i].name.c_str(), (dr) ? 1 : 0, bank->tone[i].pan, (bank->tone[i].note != -1) ? bank->tone[i].note : ((dr) ? i : -1), @@ -618,7 +619,7 @@ int Renderer::fill_bank(int dr, int b) bank->instrument[i] = ip; if (ip == NULL) { - if (bank->tone[i].name.IsEmpty()) + if (bank->tone[i].name.length() == 0) { cmsg(CMSG_WARNING, (b != 0) ? VERB_VERBOSE : VERB_DEBUG, "No instrument mapped to %s %d, program %d%s\n", @@ -629,7 +630,7 @@ int Renderer::fill_bank(int dr, int b) { cmsg(CMSG_ERROR, VERB_DEBUG, "Couldn't load instrument %s (%s %d, program %d)\n", - bank->tone[i].name.GetChars(), + bank->tone[i].name.c_str(), (dr) ? "drum set" : "tone bank", b, i); } if (b != 0) diff --git a/src/sound/timidity/instrum_dls.cpp b/libraries/timidity/instrum_dls.cpp similarity index 99% rename from src/sound/timidity/instrum_dls.cpp rename to libraries/timidity/instrum_dls.cpp index 566e3161b..552090e09 100644 --- a/src/sound/timidity/instrum_dls.cpp +++ b/libraries/timidity/instrum_dls.cpp @@ -32,15 +32,6 @@ #include "playmidi.h" -#ifndef MAKE_ID -#ifndef __BIG_ENDIAN__ -#define MAKE_ID(a,b,c,d) ((uint32_t)((a)|((b)<<8)|((c)<<16)|((d)<<24))) -#else -#define MAKE_ID(a,b,c,d) ((uint32_t)((d)|((c)<<8)|((b)<<16)|((a)<<24))) -#endif -#endif - - #define __Sound_SetError(x) namespace Timidity diff --git a/src/sound/timidity/instrum_font.cpp b/libraries/timidity/instrum_font.cpp similarity index 100% rename from src/sound/timidity/instrum_font.cpp rename to libraries/timidity/instrum_font.cpp diff --git a/src/sound/timidity/instrum_sf2.cpp b/libraries/timidity/instrum_sf2.cpp similarity index 96% rename from src/sound/timidity/instrum_sf2.cpp rename to libraries/timidity/instrum_sf2.cpp index be7717d40..8a2ecfa30 100644 --- a/src/sound/timidity/instrum_sf2.cpp +++ b/libraries/timidity/instrum_sf2.cpp @@ -3,10 +3,10 @@ #include #include #include +#include +#include -#include "doomdef.h" #include "t_swap.h" -#include "templates.h" #include "timidity.h" #include "timidity_file.h" #include "common.h" @@ -683,10 +683,10 @@ static void ParseShdr(SFFile *sf2, timidity_file *f, uint32_t chunkid, uint32_t } // Clamp sample positions to the available sample data. - sample->Start = MIN(sample->Start, sf2->SizeSampleData - 1); - sample->End = MIN(sample->End, sf2->SizeSampleData - 1); - sample->StartLoop = MIN(sample->StartLoop, sf2->SizeSampleData - 1); - sample->EndLoop = MIN(sample->EndLoop, sf2->SizeSampleData - 1); + sample->Start = std::min(sample->Start, sf2->SizeSampleData - 1); + sample->End = std::min(sample->End, sf2->SizeSampleData - 1); + sample->StartLoop = std::min(sample->StartLoop, sf2->SizeSampleData - 1); + sample->EndLoop = std::min(sample->EndLoop, sf2->SizeSampleData - 1); if (sample->Start >= sample->End) { @@ -872,7 +872,7 @@ void SFFile::SetAllOrders(int order) { Presets[i].LoadOrder = order; } - for (unsigned int i = 0; i < Percussion.Size(); ++i) + for (size_t i = 0; i < Percussion.size(); ++i) { Percussion[i].LoadOrder = order; } @@ -887,7 +887,7 @@ Instrument *SFFile::LoadInstrumentOrder(Renderer *song, int order, int drum, int { if (drum) { - for (unsigned int i = 0; i < Percussion.Size(); ++i) + for (size_t i = 0; i < Percussion.size(); ++i) { if ((order < 0 || Percussion[i].LoadOrder == order) && Percussion[i].Generators.drumset == bank && @@ -1040,11 +1040,11 @@ void SFFile::CheckZones(int start, int stop, bool instr) // Check for swapped ranges. (Should we fix them or ignore them?) if (bag[i].KeyRange.Lo > bag[i].KeyRange.Hi) { - swapvalues(bag[i].KeyRange.Lo, bag[i].KeyRange.Hi); + std::swap(bag[i].KeyRange.Lo, bag[i].KeyRange.Hi); } if (bag[i].VelRange.Lo > bag[i].VelRange.Hi) { - swapvalues(bag[i].VelRange.Lo, bag[i].VelRange.Hi); + std::swap(bag[i].VelRange.Lo, bag[i].VelRange.Hi); } } } @@ -1147,10 +1147,10 @@ void SFFile::TranslatePercussionPresetZone(SFPreset *preset, SFBag *pzone) AddPresetGenerators(&perc.Generators, pzone->GenIndex, (pzone + 1)->GenIndex, preset); perc.Generators.drumset = (uint8_t)preset->Program; perc.Generators.key = key; - perc.Generators.velRange.Lo = MAX(pzone->VelRange.Lo, InstrBags[i].VelRange.Lo); - perc.Generators.velRange.Hi = MIN(pzone->VelRange.Hi, InstrBags[i].VelRange.Hi); + perc.Generators.velRange.Lo = std::max(pzone->VelRange.Lo, InstrBags[i].VelRange.Lo); + perc.Generators.velRange.Hi = std::min(pzone->VelRange.Hi, InstrBags[i].VelRange.Hi); perc.Generators.sampleID = InstrBags[i].Target; - Percussion.Push(perc); + Percussion.push_back(perc); } } } @@ -1222,7 +1222,7 @@ void SFFile::AddPresetGenerators(SFGenComposite *composite, int start, int stop, } else { - added = clamp(added, def->Min, def->Max); + added = std::max(def->Max, std::min(def->Min, added)); } ((int16_t *)composite)[def->StructIndex] = added; gen_set[gen->Oper] = true; @@ -1235,7 +1235,7 @@ void SFFile::AddPresetGenerators(SFGenComposite *composite, int start, int stop, Instrument *SFFile::LoadPercussion(Renderer *song, SFPerc *perc) { - unsigned int i; + size_t i; int drumkey; int drumset; int j; @@ -1246,7 +1246,7 @@ Instrument *SFFile::LoadPercussion(Renderer *song, SFPerc *perc) drumset = perc->Generators.drumset; // Count all percussion composites that match this one's key and set. - for (i = 0; i < Percussion.Size(); ++i) + for (i = 0; i < Percussion.size(); ++i) { if (Percussion[i].Generators.key == drumkey && Percussion[i].Generators.drumset == drumset && @@ -1272,7 +1272,7 @@ Instrument *SFFile::LoadPercussion(Renderer *song, SFPerc *perc) memset(ip->sample, 0, sizeof(Sample) * ip->samples); // Fill in Sample structure for each composite. - for (j = 0, i = 0; i < Percussion.Size(); ++i) + for (j = 0, i = 0; i < Percussion.size(); ++i) { SFPerc *zone = &Percussion[i]; SFGenComposite *gen = &zone->Generators; @@ -1385,12 +1385,12 @@ Instrument *SFFile::LoadPreset(Renderer *song, SFPreset *preset) Sample *sp = ip->sample + k++; // Set velocity range - sp->low_vel = MAX(InstrBags[j].VelRange.Lo, PresetBags[i].VelRange.Lo); - sp->high_vel = MIN(InstrBags[j].VelRange.Hi, PresetBags[i].VelRange.Hi); + sp->low_vel = std::max(InstrBags[j].VelRange.Lo, PresetBags[i].VelRange.Lo); + sp->high_vel = std::min(InstrBags[j].VelRange.Hi, PresetBags[i].VelRange.Hi); // Set frequency range - sp->low_freq = note_to_freq(MAX(InstrBags[j].KeyRange.Lo, PresetBags[i].KeyRange.Lo)); - sp->high_freq = note_to_freq(MIN(InstrBags[j].KeyRange.Hi, PresetBags[i].KeyRange.Hi)); + sp->low_freq = note_to_freq(std::max(InstrBags[j].KeyRange.Lo, PresetBags[i].KeyRange.Lo)); + sp->high_freq = note_to_freq(std::min(InstrBags[j].KeyRange.Hi, PresetBags[i].KeyRange.Hi)); gen = DefaultGenerators; if (inst->bHasGlobalZone) @@ -1426,10 +1426,10 @@ void SFFile::ApplyGeneratorsToRegion(SFGenComposite *gen, SFSample *sfsamp, Rend int start, end; start = gen->startAddrsOffset + gen->startAddrsCoarseOffset * 32768; end = gen->endAddrsOffset + gen->endAddrsCoarseOffset * 32768; - start = MAX(sfsamp->Start, sfsamp->Start + start); - end = MIN(sfsamp->End, sfsamp->End + end); - sp->loop_start = MAX(start, sfsamp->StartLoop + gen->startLoopAddrsOffset + gen->startLoopAddrsCoarseOffset * 32768); - sp->loop_end = MIN(end, sfsamp->EndLoop + gen->endLoopAddrsOffset + gen->endLoopAddrsCoarseOffset * 32768); + start = std::max(sfsamp->Start, sfsamp->Start + start); + end = std::min(sfsamp->End, sfsamp->End + end); + sp->loop_start = std::max(start, sfsamp->StartLoop + gen->startLoopAddrsOffset + gen->startLoopAddrsCoarseOffset * 32768); + sp->loop_end = std::min(end, sfsamp->EndLoop + gen->endLoopAddrsOffset + gen->endLoopAddrsCoarseOffset * 32768); sp->loop_start = (sp->loop_start - start) << FRACTION_BITS; sp->loop_end = (sp->loop_end - start) << FRACTION_BITS; diff --git a/src/sound/timidity/mix.cpp b/libraries/timidity/mix.cpp similarity index 100% rename from src/sound/timidity/mix.cpp rename to libraries/timidity/mix.cpp diff --git a/src/sound/timidity/playmidi.cpp b/libraries/timidity/playmidi.cpp similarity index 99% rename from src/sound/timidity/playmidi.cpp rename to libraries/timidity/playmidi.cpp index 83d327666..0ab0488ef 100644 --- a/src/sound/timidity/playmidi.cpp +++ b/libraries/timidity/playmidi.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include "timidity.h" #include "common.h" diff --git a/src/sound/timidity/resample.cpp b/libraries/timidity/resample.cpp similarity index 100% rename from src/sound/timidity/resample.cpp rename to libraries/timidity/resample.cpp diff --git a/src/sound/timidity/timidity.cpp b/libraries/timidity/timidity.cpp similarity index 98% rename from src/sound/timidity/timidity.cpp rename to libraries/timidity/timidity.cpp index ebdfcff09..1d7d09c64 100644 --- a/src/sound/timidity/timidity.cpp +++ b/libraries/timidity/timidity.cpp @@ -23,6 +23,8 @@ #include #include #include +#include +#include #include "timidity.h" #include "timidity_file.h" @@ -596,7 +598,7 @@ int Instruments::LoadDMXGUS(int gus_memsize) long read = 0; uint8_t remap[256]; - FString patches[256]; + std::string patches[256]; memset(remap, 255, sizeof(remap)); char temp[16]; int current = -1; @@ -680,7 +682,7 @@ int Instruments::LoadDMXGUS(int gus_memsize) int j = (gusbank > 0) ? remap[k] : k; if (k == 128) bank = drumset[0]; // No need to bother with things that don't exist - if (patches[j].IsEmpty()) + if (patches[j].length() == 0) continue; int val = k % 128; @@ -727,7 +729,7 @@ Renderer::~Renderer() { if (resample_buffer != NULL) { - M_Free(resample_buffer); + free(resample_buffer); } if (voice != NULL) { @@ -752,7 +754,7 @@ void Renderer::ComputeOutput(float *buffer, int count) if (resample_buffer_size < count) { resample_buffer_size = count; - resample_buffer = (sample_t *)M_Realloc(resample_buffer, count * sizeof(float) * 2); + resample_buffer = (sample_t *)realloc(resample_buffer, count * sizeof(float) * 2); } for (int i = 0; i < voices; i++, v++) { diff --git a/src/sound/timidity/common.h b/libraries/timidity/timidity/common.h similarity index 95% rename from src/sound/timidity/common.h rename to libraries/timidity/timidity/common.h index 9554a0e58..4f02f399d 100644 --- a/src/sound/timidity/common.h +++ b/libraries/timidity/timidity/common.h @@ -138,5 +138,12 @@ common.h extern void *safe_malloc(size_t count); +#ifndef MAKE_ID +#ifndef __BIG_ENDIAN__ +#define MAKE_ID(a,b,c,d) ((uint32_t)((a)|((b)<<8)|((c)<<16)|((d)<<24))) +#else +#define MAKE_ID(a,b,c,d) ((uint32_t)((d)|((c)<<8)|((b)<<16)|((a)<<24))) +#endif +#endif } diff --git a/src/sound/timidity/dls1.h b/libraries/timidity/timidity/dls1.h similarity index 100% rename from src/sound/timidity/dls1.h rename to libraries/timidity/timidity/dls1.h diff --git a/src/sound/timidity/dls2.h b/libraries/timidity/timidity/dls2.h similarity index 100% rename from src/sound/timidity/dls2.h rename to libraries/timidity/timidity/dls2.h diff --git a/src/sound/timidity/gf1patch.h b/libraries/timidity/timidity/gf1patch.h similarity index 100% rename from src/sound/timidity/gf1patch.h rename to libraries/timidity/timidity/gf1patch.h diff --git a/src/sound/timidity/instrum.h b/libraries/timidity/timidity/instrum.h similarity index 99% rename from src/sound/timidity/instrum.h rename to libraries/timidity/timidity/instrum.h index 6f0679686..452327fbe 100644 --- a/src/sound/timidity/instrum.h +++ b/libraries/timidity/timidity/instrum.h @@ -116,7 +116,7 @@ struct ToneBankElement note(0), pan(0), strip_loop(0), strip_envelope(0), strip_tail(0) {} - FString name; + std::string name; int note, pan, fontbank, fontpreset, fontnote; int8_t strip_loop, strip_envelope, strip_tail; }; diff --git a/src/sound/timidity/playmidi.h b/libraries/timidity/timidity/playmidi.h similarity index 100% rename from src/sound/timidity/playmidi.h rename to libraries/timidity/timidity/playmidi.h diff --git a/src/sound/timidity/sf2.h b/libraries/timidity/timidity/sf2.h similarity index 99% rename from src/sound/timidity/sf2.h rename to libraries/timidity/timidity/sf2.h index 50c093857..2f161cda9 100644 --- a/src/sound/timidity/sf2.h +++ b/libraries/timidity/timidity/sf2.h @@ -1,4 +1,5 @@ #pragma once +#include namespace Timidity { typedef uint16_t SFGenerator; @@ -304,7 +305,7 @@ struct SFFile : public FontFile SFBag *InstrBags; SFGenList *InstrGenerators; SFSample *Samples; - TArray Percussion; + std::vector Percussion; int MinorVersion; uint32_t SampleDataOffset; uint32_t SampleDataLSBOffset; diff --git a/src/sound/timidity/t_swap.h b/libraries/timidity/timidity/t_swap.h similarity index 100% rename from src/sound/timidity/t_swap.h rename to libraries/timidity/timidity/t_swap.h diff --git a/src/sound/timidity/timidity.h b/libraries/timidity/timidity/timidity.h similarity index 100% rename from src/sound/timidity/timidity.h rename to libraries/timidity/timidity/timidity.h diff --git a/src/sound/timidity/timidity_file.h b/libraries/timidity/timidity/timidity_file.h similarity index 100% rename from src/sound/timidity/timidity_file.h rename to libraries/timidity/timidity/timidity_file.h diff --git a/libraries/timidityplus/CMakeLists.txt b/libraries/timidityplus/CMakeLists.txt index 6bdaa2840..bf386b9af 100644 --- a/libraries/timidityplus/CMakeLists.txt +++ b/libraries/timidityplus/CMakeLists.txt @@ -11,6 +11,9 @@ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ZD_FASTMATH_FLAG}") include_directories( timiditypp ) +file( GLOB HEADER_FILES + timiditypp/*.h + ) add_library( timidityplus STATIC fft4g.cpp reverb.cpp diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 2c0f565ab..c6a293467 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}" "${TIMIDITYPP_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}" "${TIMIDITY_INCLUDE_DIR}" ) if( ${HAVE_VM_JIT} ) add_definitions( -DHAVE_VM_JIT ) @@ -693,7 +693,6 @@ file( GLOB HEADER_FILES sound/oplsynth/*.h sound/oplsynth/dosbox/*.h sound/thirdparty/*.h - sound/timidity/*.h sound/wildmidi/*.h rendering/*.h rendering/2d/*.h @@ -1220,15 +1219,6 @@ set (PCH_SOURCES sound/oplsynth/dosbox/opl.cpp sound/oplsynth/OPL3.cpp sound/oplsynth/nukedopl3.cpp - sound/timidity/common.cpp - sound/timidity/instrum.cpp - sound/timidity/instrum_dls.cpp - sound/timidity/instrum_font.cpp - sound/timidity/instrum_sf2.cpp - sound/timidity/mix.cpp - sound/timidity/playmidi.cpp - sound/timidity/resample.cpp - sound/timidity/timidity.cpp sound/wildmidi/file_io.cpp sound/wildmidi/gus_pat.cpp sound/wildmidi/reverb.cpp @@ -1330,7 +1320,7 @@ if( UNIX ) endif() endif() -target_link_libraries( zdoom ${ZDOOM_LIBS} gdtoa dumb lzma adl opn timidityplus ) +target_link_libraries( zdoom ${ZDOOM_LIBS} gdtoa dumb lzma adl opn timidity timidityplus ) include_directories( . g_statusbar @@ -1348,7 +1338,6 @@ include_directories( . sound/music sound/backend sound/oplsynth - sound/timidity sound/wildmidi xlat utility @@ -1461,7 +1450,6 @@ source_group("Audio Files" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/soun source_group("Audio Files\\Backend" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/sound/backend/.+") 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\\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/.+")