shithub: choc

Download patch

ref: 2d12a652c35ba446a896bbe56c7eb0e806773a08
parent: fa64e348b538562d7e063a6955db461f5c36bbb5
author: Turo Lamminen <[email protected]>
date: Wed Sep 7 09:32:24 EDT 2022

pcsound: Move pcsound_driver_t extern declarations to pcsound_internal.h

--- a/pcsound/pcsound.c
+++ b/pcsound/pcsound.c
@@ -24,27 +24,6 @@
 #include "pcsound_internal.h"
 
 
-#ifdef HAVE_DEV_ISA_SPKRIO_H
-#define HAVE_BSD_SPEAKER
-#endif
-#ifdef HAVE_DEV_SPEAKER_SPEAKER_H
-#define HAVE_BSD_SPEAKER
-#endif
-
-#ifdef _WIN32
-extern pcsound_driver_t pcsound_win32_driver;
-#endif
-
-#ifdef HAVE_BSD_SPEAKER
-extern pcsound_driver_t pcsound_bsd_driver;
-#endif
-
-#ifdef HAVE_LINUX_KD_H
-extern pcsound_driver_t pcsound_linux_driver;
-#endif
-
-extern pcsound_driver_t pcsound_sdl_driver;
-
 static pcsound_driver_t *drivers[] = 
 {
 #ifdef HAVE_LINUX_KD_H
--- a/pcsound/pcsound_internal.h
+++ b/pcsound/pcsound_internal.h
@@ -20,6 +20,13 @@
 
 #include "pcsound.h"
 
+#ifdef HAVE_DEV_ISA_SPKRIO_H
+#define HAVE_BSD_SPEAKER
+#endif
+#ifdef HAVE_DEV_SPEAKER_SPEAKER_H
+#define HAVE_BSD_SPEAKER
+#endif
+
 #define PCSOUND_8253_FREQUENCY 1193280
 
 typedef struct pcsound_driver_s pcsound_driver_t;
@@ -34,6 +41,22 @@
 };
 
 extern int pcsound_sample_rate;
+
+
+#ifdef _WIN32
+extern pcsound_driver_t pcsound_win32_driver;
+#endif
+
+#ifdef HAVE_BSD_SPEAKER
+extern pcsound_driver_t pcsound_bsd_driver;
+#endif
+
+#ifdef HAVE_LINUX_KD_H
+extern pcsound_driver_t pcsound_linux_driver;
+#endif
+
+extern pcsound_driver_t pcsound_sdl_driver;
+
 
 #endif /* #ifndef PCSOUND_INTERNAL_H */