From dcef3681d464732ffc5a546703e3953f33097b24 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 24 Sep 2019 23:12:38 +0200 Subject: [PATCH] - cleaned up the includes in timidity.cpp. --- src/sound/timidity/timidity.cpp | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/src/sound/timidity/timidity.cpp b/src/sound/timidity/timidity.cpp index 4506c5b164..ebdfcff09d 100644 --- a/src/sound/timidity/timidity.cpp +++ b/src/sound/timidity/timidity.cpp @@ -24,19 +24,7 @@ #include #include -#include "templates.h" -#include "cmdlib.h" -#include "c_cvars.h" -#include "c_dispatch.h" -#include "doomerrors.h" -#include "i_system.h" -#include "files.h" -#include "w_wad.h" -#include "i_soundfont.h" -#include "i_musicinterns.h" -#include "v_text.h" #include "timidity.h" -#include "i_soundfont.h" #include "timidity_file.h" #include "common.h" #include "instrum.h" @@ -615,7 +603,7 @@ int Instruments::LoadDMXGUS(int gus_memsize) int status = -1; int gusbank = (gus_memsize >= 1 && gus_memsize <= 4) ? gus_memsize : -1; - data->seek(0, FileReader::SeekSet); + data->seek(0, SEEK_SET); while (data->gets(readbuffer, 1024) && read < size) { @@ -706,9 +694,7 @@ int Instruments::LoadDMXGUS(int gus_memsize) return 0; } -DLS_Data *LoadDLS(FILE *src); void FreeDLS(DLS_Data *data); - Renderer::Renderer(float sample_rate, int voices_, Instruments *inst) { int res = 0; @@ -722,7 +708,7 @@ Renderer::Renderer(float sample_rate, int voices_, Instruments *inst) voice = NULL; adjust_panning_immediately = false; - control_ratio = clamp(int(rate / CONTROLS_PER_SECOND), 1, MAX_CONTROL_RATIO); + control_ratio = std::min(1, std::max(MAX_CONTROL_RATIO, int(rate / CONTROLS_PER_SECOND))); lost_notes = 0; cut_notes = 0;