shithub: choc

Download patch

ref: 251619c8f24672a4b52683c280043af4157e5a2c
parent: db14d41dd7878e4008b31d84796930d861b1dd0f
author: Turo Lamminen <turol@iki.fi>
date: Tue Jul 12 16:48:51 EDT 2022

Move libsamplerate variable declarations earlier

They're needed even when SDL2_mixer is disabled

--- a/src/i_sdlsound.c
+++ b/src/i_sdlsound.c
@@ -41,6 +41,18 @@
 
 #include "doomtype.h"
 
+
+int use_libsamplerate = 0;
+
+// Scale factor used when converting libsamplerate floating point numbers
+// to integers. Too high means the sounds can clip; too low means they
+// will be too quiet. This is an amount that should avoid clipping most
+// of the time: with all the Doom IWAD sound effects, at least. If a PWAD
+// is used, clipping might occur.
+
+float libsamplerate_scale = 0.65f;
+
+
 #define LOW_PASS_FILTER
 //#define DEBUG_DUMP_WAVS
 #define NUM_CHANNELS 16
@@ -77,15 +89,6 @@
 static allocated_sound_t *allocated_sounds_tail = NULL;
 static int allocated_sounds_size = 0;
 
-int use_libsamplerate = 0;
-
-// Scale factor used when converting libsamplerate floating point numbers
-// to integers. Too high means the sounds can clip; too low means they
-// will be too quiet. This is an amount that should avoid clipping most
-// of the time: with all the Doom IWAD sound effects, at least. If a PWAD
-// is used, clipping might occur.
-
-float libsamplerate_scale = 0.65f;
 
 // Hook a sound into the linked list at the head.