فهرست منبع

make old audio interface and miles mutually exclusive

cxgeorge 24 سال پیش
والد
کامیت
d18fe97ce6
6فایلهای تغییر یافته به همراه35 افزوده شده و 46 حذف شده
  1. 3 0
      dtool/Config.Win32.pp
  2. 12 10
      dtool/Config.pp
  3. 5 5
      dtool/Package.pp
  4. 10 23
      dtool/pptempl/Global.pp
  5. 4 6
      panda/src/audio/Sources.pp
  6. 1 2
      panda/src/audiotraits/Sources.pp

+ 3 - 0
dtool/Config.Win32.pp

@@ -91,6 +91,9 @@
 // interface)?
 // interface)?
 #define HAVE_SYS_SOUNDCARD_H
 #define HAVE_SYS_SOUNDCARD_H
 
 
+// Do we use the Miles sound interface instead of the default DirectSound-based interface
+#define USE_RAD_MSS yes
+
 // Do we have RTTI (and <typeinfo>)?
 // Do we have RTTI (and <typeinfo>)?
 #define HAVE_RTTI 1
 #define HAVE_RTTI 1
 
 

+ 12 - 10
dtool/Config.pp

@@ -147,13 +147,6 @@
 // to enable it only for optimize levels 1 and 2.
 // to enable it only for optimize levels 1 and 2.
 #defer TRACK_IN_INTERPRETER $[<= $[OPTIMIZE], 2]
 #defer TRACK_IN_INTERPRETER $[<= $[OPTIMIZE], 2]
 
 
-
-// Info for the RAD game tools, Miles Sound System
-#define RAD_MSS_IPATH /usr/include/Miles6/include
-#define RAD_MSS_LPATH /usr/lib/Miles6/lib/win
-#define RAD_MSS_LIBS Mss32
-#defer HAVE_RAD_MSS $[libtest $[RAD_MSS_LPATH],$[RAD_MSS_LIBS]]
-
 // Is NSPR installed, and where?  This is the Netscape Portable
 // Is NSPR installed, and where?  This is the Netscape Portable
 // Runtime library, downloadable as part of the Mozilla package from
 // Runtime library, downloadable as part of the Mozilla package from
 // mozilla.org.  It provides portable threading and networking
 // mozilla.org.  It provides portable threading and networking
@@ -310,15 +303,24 @@
 
 
 // Do you want to build the audio interface?  What additional
 // Do you want to build the audio interface?  What additional
 // libraries are required?
 // libraries are required?
-#define AUDIO_IPATH /mspsdk/Include
-#define AUDIO_LPATH /mspsdk/Lib
+
+#define HAVE_AUDIO 1     
+
 #if $[eq $[PLATFORM],Win32]
 #if $[eq $[PLATFORM],Win32]
+  // vars for older directsound-based audio interface, maybe be overwritten later in Global.pp
+  #define AUDIO_IPATH /mspsdk/Include
+  #define AUDIO_LPATH /mspsdk/Lib  
   #define AUDIO_LIBS winmm.lib dsound.lib user32.lib ole32.lib dxguid.lib
   #define AUDIO_LIBS winmm.lib dsound.lib user32.lib ole32.lib dxguid.lib
 #else
 #else
   #define AUDIO_LIBS
   #define AUDIO_LIBS
 #endif
 #endif
-#define HAVE_AUDIO 1
 
 
+// Info for the RAD game tools, Miles Sound System 
+// note this may be overwritten in wintools Config.pp
+#define RAD_MSS_IPATH /usr/include/Miles6/include
+#define RAD_MSS_LPATH /usr/lib/Miles6/lib/win
+#define RAD_MSS_LIBS Mss32
+#defer HAVE_RAD_MSS $[libtest $[RAD_MSS_LPATH],$[RAD_MSS_LIBS]]
 
 
 // Is Gtk-- installed?  How should we run the gtkmm-config program?
 // Is Gtk-- installed?  How should we run the gtkmm-config program?
 // This matters only to programs in PANDATOOL.
 // This matters only to programs in PANDATOOL.

+ 5 - 5
dtool/Package.pp

@@ -73,11 +73,6 @@
 #set PYTHON_LPATH $[PYTHON_LPATH]
 #set PYTHON_LPATH $[PYTHON_LPATH]
 #set HAVE_PYTHON $[HAVE_PYTHON]
 #set HAVE_PYTHON $[HAVE_PYTHON]
 
 
-#set RAD_MSS_IPATH $[RAD_MSS_IPATH]
-#set RAD_MSS_LPATH $[RAD_MSS_LPATH]
-#set RAD_MSS_LIBS $[RAD_MSS_LIBS]
-#set HAVE_RAD_MSS $[HAVE_RAD_MSS]
-
 #set NSPR_IPATH $[NSPR_IPATH]
 #set NSPR_IPATH $[NSPR_IPATH]
 #set NSPR_LPATH $[NSPR_LPATH]
 #set NSPR_LPATH $[NSPR_LPATH]
 #set NSPR_LIBS $[NSPR_LIBS]
 #set NSPR_LIBS $[NSPR_LIBS]
@@ -163,6 +158,11 @@
 #set AUDIO_LIBS $[AUDIO_LIBS]
 #set AUDIO_LIBS $[AUDIO_LIBS]
 #set HAVE_AUDIO $[HAVE_AUDIO]
 #set HAVE_AUDIO $[HAVE_AUDIO]
 
 
+#set RAD_MSS_IPATH $[RAD_MSS_IPATH]
+#set RAD_MSS_LPATH $[RAD_MSS_LPATH]
+#set RAD_MSS_LIBS $[RAD_MSS_LIBS]
+#set HAVE_RAD_MSS $[HAVE_RAD_MSS]
+
 #set GTKMM_CONFIG $[GTKMM_CONFIG]
 #set GTKMM_CONFIG $[GTKMM_CONFIG]
 #set HAVE_GTKMM $[HAVE_GTKMM]
 #set HAVE_GTKMM $[HAVE_GTKMM]
 
 

+ 10 - 23
dtool/pptempl/Global.pp

@@ -80,13 +80,6 @@
   #define python_lpath $[wildcard $[PYTHON_LPATH]]
   #define python_lpath $[wildcard $[PYTHON_LPATH]]
 #endif
 #endif
 
 
-#if $[HAVE_RAD_MSS]
-  #define rad_mss_ipath $[wildcard $[RAD_MSS_IPATH]]
-  #define rad_mss_lpath $[wildcard $[RAD_MSS_LPATH]]
-  #define rad_mss_cflags $[RAD_MSS_CFLAGS]
-  #define rad_mss_libs $[RAD_MSS_LIBS]
-#endif
-
 #if $[HAVE_NSPR]
 #if $[HAVE_NSPR]
   #define nspr_ipath $[wildcard $[NSPR_IPATH]]
   #define nspr_ipath $[wildcard $[NSPR_IPATH]]
   #define nspr_lpath $[wildcard $[NSPR_LPATH]]
   #define nspr_lpath $[wildcard $[NSPR_LPATH]]
@@ -210,13 +203,19 @@
   #define net_libs $[NET_LIBS]
   #define net_libs $[NET_LIBS]
 #endif
 #endif
 
 
+#if $[and $[eq $[PLATFORM],Win32], $[ne $[USE_RAD_MSS],]]
+     // Info for the RAD game tools, Miles Sound System  
+     #define AUDIO_IPATH $[RAD_MSS_IPATH]
+     #define AUDIO_LPATH $[RAD_MSS_LPATH]
+     #define AUDIO_LIBS $[RAD_MSS_LIBS]
+#endif   
+
 #if $[HAVE_AUDIO]
 #if $[HAVE_AUDIO]
-  #define audio_ipath $[wildcard $[AUDIO_IPATH]]
-  #define audio_lpath $[wildcard $[AUDIO_LPATH]]
-  #define audio_libs $[AUDIO_LIBS]
+    #define audio_ipath $[wildcard $[AUDIO_IPATH]]
+    #define audio_lpath $[wildcard $[AUDIO_LPATH]]
+    #define audio_libs $[AUDIO_LIBS]  
 #endif
 #endif
 
 
-
 // This variable, when evaluated in the scope of a particular directory,
 // This variable, when evaluated in the scope of a particular directory,
 // will indicate true (i.e. nonempty) when the directory is truly built,
 // will indicate true (i.e. nonempty) when the directory is truly built,
 // or false (empty) when the directory is not to be built.
 // or false (empty) when the directory is not to be built.
@@ -415,9 +414,6 @@
   #if $[ne $[USE_VRPN] $[components $[USE_VRPN],$[active_component_libs]],]
   #if $[ne $[USE_VRPN] $[components $[USE_VRPN],$[active_component_libs]],]
     #set alt_cflags $[alt_cflags] $[vrpn_cflags]
     #set alt_cflags $[alt_cflags] $[vrpn_cflags]
   #endif 
   #endif 
-  #if $[ne $[USE_RAD_MSS] $[components $[USE_RAD_MSS],$[active_component_libs]],]
-    #set alt_cflags $[alt_cflags] $[rad_mss_cflags]
-  #endif
   #if $[ne $[USE_AUDIO] $[components $[USE_AUDIO],$[active_component_libs]],]
   #if $[ne $[USE_AUDIO] $[components $[USE_AUDIO],$[active_component_libs]],]
     #set alt_cflags $[alt_cflags] $[audio_cflags]
     #set alt_cflags $[alt_cflags] $[audio_cflags]
   #endif
   #endif
@@ -483,9 +479,6 @@
   #if $[ne $[USE_VRPN] $[components $[USE_VRPN],$[active_component_libs]],]
   #if $[ne $[USE_VRPN] $[components $[USE_VRPN],$[active_component_libs]],]
     #set alt_ipath $[alt_ipath] $[vrpn_ipath]
     #set alt_ipath $[alt_ipath] $[vrpn_ipath]
   #endif
   #endif
-  #if $[ne $[USE_RAD_MSS] $[components $[USE_RAD_MSS],$[active_component_libs]],]
-    #set alt_ipath $[alt_ipath] $[rad_mss_ipath]
-  #endif
   #if $[ne $[USE_AUDIO] $[components $[USE_AUDIO],$[active_component_libs]],]
   #if $[ne $[USE_AUDIO] $[components $[USE_AUDIO],$[active_component_libs]],]
     #set alt_ipath $[alt_ipath] $[audio_ipath]
     #set alt_ipath $[alt_ipath] $[audio_ipath]
   #endif
   #endif
@@ -551,9 +544,6 @@
   #if $[ne $[USE_VRPN] $[components $[USE_VRPN],$[active_component_libs] $[transitive_link]],]
   #if $[ne $[USE_VRPN] $[components $[USE_VRPN],$[active_component_libs] $[transitive_link]],]
     #set alt_lpath $[alt_lpath] $[vrpn_lpath]
     #set alt_lpath $[alt_lpath] $[vrpn_lpath]
   #endif
   #endif
-  #if $[ne $[USE_RAD_MSS] $[components $[USE_RAD_MSS],$[active_component_libs] $[transitive_link]],]
-    #set alt_lpath $[alt_lpath] $[rad_mss_lpath]
-  #endif
   #if $[ne $[USE_AUDIO] $[components $[USE_AUDIO],$[active_component_libs] $[transitive_link]],]
   #if $[ne $[USE_AUDIO] $[components $[USE_AUDIO],$[active_component_libs] $[transitive_link]],]
     #set alt_lpath $[alt_lpath] $[audio_lpath]
     #set alt_lpath $[alt_lpath] $[audio_lpath]
   #endif
   #endif
@@ -620,9 +610,6 @@
   #if $[ne $[USE_VRPN] $[components $[USE_VRPN],$[active_component_libs] $[transitive_link]],]
   #if $[ne $[USE_VRPN] $[components $[USE_VRPN],$[active_component_libs] $[transitive_link]],]
     #set alt_libs $[alt_libs] $[vrpn_libs]
     #set alt_libs $[alt_libs] $[vrpn_libs]
   #endif
   #endif
-  #if $[ne $[USE_RAD_MSS] $[components $[USE_RAD_MSS],$[active_component_libs] $[transitive_link]],]
-    #set alt_libs $[alt_libs] $[rad_mss_libs]
-  #endif
   #if $[ne $[USE_AUDIO] $[components $[USE_AUDIO],$[active_component_libs] $[transitive_link]],]
   #if $[ne $[USE_AUDIO] $[components $[USE_AUDIO],$[active_component_libs] $[transitive_link]],]
     #set alt_libs $[alt_libs] $[audio_libs]
     #set alt_libs $[alt_libs] $[audio_libs]
   #endif
   #endif

+ 4 - 6
panda/src/audio/Sources.pp

@@ -6,7 +6,6 @@
 #begin lib_target
 #begin lib_target
   #define USE_AUDIO yes
   #define USE_AUDIO yes
   #define USE_MIKMOD yes
   #define USE_MIKMOD yes
-  #define USE_RAD_MSS yes
 
 
   #define TARGET audio
   #define TARGET audio
   #define LOCAL_LIBS putil ipc gui
   #define LOCAL_LIBS putil ipc gui
@@ -20,21 +19,20 @@
     audio_mikmod_traits.cxx audio_mikmod_traits.h \
     audio_mikmod_traits.cxx audio_mikmod_traits.h \
     audio_win_traits.I audio_win_traits.cxx audio_win_traits.h \
     audio_win_traits.I audio_win_traits.cxx audio_win_traits.h \
     audio_null_traits.I audio_null_traits.cxx audio_null_traits.h \
     audio_null_traits.I audio_null_traits.cxx audio_null_traits.h \
-    audio_rad_mss_traits.I audio_rad_mss_traits.cxx audio_rad_mss_traits.h \
     audio_linux_traits.I audio_linux_traits.cxx audio_linux_traits.h \
     audio_linux_traits.I audio_linux_traits.cxx audio_linux_traits.h \
     audio_sound.I audio_sound.cxx audio_sound.h \
     audio_sound.I audio_sound.cxx audio_sound.h \
-    audio_gui_functor.h audio_gui_functor.cxx
+    audio_gui_functor.h audio_gui_functor.cxx \
+    $[if $[USE_RAD_MSS], audio_rad_mss_traits.I audio_rad_mss_traits.cxx audio_rad_mss_traits.h,]
 
 
   #define INSTALL_HEADERS \
   #define INSTALL_HEADERS \
     audio.h audio_manager.h \
     audio.h audio_manager.h \
     audio_pool.I audio_pool.h \
     audio_pool.I audio_pool.h \
     audio_trait.h audio_mikmod_traits.h \
     audio_trait.h audio_mikmod_traits.h \
     audio_win_traits.I audio_win_traits.h \
     audio_win_traits.I audio_win_traits.h \
-    audio_rad_mss_traits.I audio_rad_mss_traits.h \
     audio_null_traits.I audio_null_traits.h \
     audio_null_traits.I audio_null_traits.h \
     audio_linux_traits.I audio_linux_traits.h \
     audio_linux_traits.I audio_linux_traits.h \
-    config_audio.h audio_manager.I audio_sound.h audio_sound.I \
-    audio_gui_functor.h
+    config_audio.h audio_manager.I audio_sound.h audio_sound.I audio_gui_functor.h \
+    $[if $[USE_RAD_MSS], audio_rad_mss_traits.I audio_rad_mss_traits.h,]
 
 
   #define IGATESCAN audio.h
   #define IGATESCAN audio.h
 #end lib_target
 #end lib_target

+ 1 - 2
panda/src/audiotraits/Sources.pp

@@ -2,7 +2,6 @@
 #define DIRECTORY_IF_AUDIO yes
 #define DIRECTORY_IF_AUDIO yes
 #define DIRECTORY_IF_IPC yes
 #define DIRECTORY_IF_IPC yes
 #define USE_AUDIO yes
 #define USE_AUDIO yes
-#define USE_RAD_MSS yes
 
 
 #begin lib_target
 #begin lib_target
   #define TARGET audio_load_midi
   #define TARGET audio_load_midi
@@ -42,7 +41,7 @@
   #define TARGET audio_load_mp3
   #define TARGET audio_load_mp3
   #define BUILDING_DLL BUILDING_MISC
   #define BUILDING_DLL BUILDING_MISC
   #define LOCAL_LIBS \
   #define LOCAL_LIBS \
-    audio mpg123 express
+    audio express $[if $[ne $[USE_RAD_MSS],] , mpg123]
   #define C++FLAGS -DGENERIC -DNOXFERMEM
   #define C++FLAGS -DGENERIC -DNOXFERMEM
 
 
   #define SOURCES \
   #define SOURCES \