foxygit / doom Log in
commit 251619c8f24672a4b52683c280043af4157e5a2c
Author:     Turo Lamminen <turol@iki.fi>
AuthorDate: Tue Jul 12 20:48:51 2022 +0300
Commit:     Turo Lamminen <turol@iki.fi>
CommitDate: Tue Jul 12 21:05:56 2022 +0300

    Move libsamplerate variable declarations earlier

    They're needed even when SDL2_mixer is disabled
---
 src/i_sdlsound.c | 21 ++++++++++++---------
 1 file changed, 12 insertions(+), 9 deletions(-)

diff --git a/src/i_sdlsound.c b/src/i_sdlsound.c
index a28e06bb..06697f2f 100644
--- 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_head = NULL;
 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.