shithub: choc

Download patch

ref: bd6ef57ac4785f70c58d02feb627407c73a2b909
parent: 955c75d8b06876a367e2d2853443590260eab028
parent: a11819e2f42b1a05251f19b9c9ed41e516eec5f3
author: Turo Lamminen <turol@users.noreply.github.com>
date: Fri Oct 7 09:10:25 EDT 2022

Merge pull request #1516 from turol/extern-windows

Remove static qualifier from some Windows-only variables and clean up some minor things

--- a/src/i_winmusic.c
+++ b/src/i_winmusic.c
@@ -19,6 +19,7 @@
 
 #include <windows.h>
 #include <mmsystem.h>
+#include <math.h>
 #include <stdio.h>
 #include <stdlib.h>
 
@@ -25,6 +26,9 @@
 #include "doomtype.h"
 #include "m_misc.h"
 #include "midifile.h"
+#include "i_sound.h"
+#include "i_winmusic.h"
+
 
 #define BETWEEN(l,u,x) (((l)>(x))?(l):((x)>(u))?(u):(x))
 
--- a/src/i_winmusic.h
+++ b/src/i_winmusic.h
@@ -14,11 +14,11 @@
 // DESCRIPTION:
 //      Windows native MIDI
 
-#ifdef _WIN32
-
 #ifndef __I_WINMUSIC__
 #define __I_WINMUSIC__
 
+#ifdef _WIN32
+
 #include "doomtype.h"
 
 boolean I_WIN_InitMusic(void);
@@ -31,9 +31,7 @@
 void I_WIN_UnRegisterSong(void);
 void I_WIN_ShutdownMusic(void);
 
-extern int winmm_reverb_level;
-extern int winmm_chorus_level;
 
-#endif
+#endif // _WIN32
 
-#endif
+#endif // __I_WINMUSIC__
--- a/src/setup/sound.c
+++ b/src/setup/sound.c
@@ -82,8 +82,8 @@
 static int midi_num_devices;
 static int midi_index;
 char *winmm_midi_device = NULL;
-static int winmm_reverb_level = 40;
-static int winmm_chorus_level = 0;
+int winmm_reverb_level = 40;
+int winmm_chorus_level = 0;
 #endif
 
 // DOS specific variables: these are unused but should be maintained