[prev in list] [next in list] [prev in thread] [next in thread]
List: bochs-cvs
Subject: [Bochs-cvs] [12555] trunk/bochs
From: vruppert () users ! sourceforge ! net
Date: 2014-11-22 11:43:42
Message-ID: E1Xs96V-0000w9-6U () sfs-ml-2 ! v29 ! ch3 ! sourceforge ! com
[Download RAW message or body]
Revision: 12555
Author: vruppert
Date: 2014-11-22 11:43:40 +0000 (Sat, 22 Nov 2014)
Log Message:
-----------
Changed to way to determine the default lowlevel sound driver (part of the
mixing3.patch by Dawn Teschendorf).
Modified Paths:
--------------
trunk/bochs/bochs.h
trunk/bochs/config.h.in
trunk/bochs/configure.in
trunk/bochs/iodev/sound/soundmod.cc
Modified: trunk/bochs/bochs.h
===================================================================
--- trunk/bochs/bochs.h 2014-11-21 23:03:19 UTC (rev 12554)
+++ trunk/bochs/bochs.h 2014-11-22 11:43:40 UTC (rev 12555)
@@ -270,7 +270,7 @@
public:
logfunctions(void);
logfunctions(class iofunctions *);
- ~logfunctions(void);
+ virtual ~logfunctions(void);
void info(const char *fmt, ...) BX_CPP_AttrPrintf(2, 3);
void error(const char *fmt, ...) BX_CPP_AttrPrintf(2, 3);
Modified: trunk/bochs/config.h.in
===================================================================
--- trunk/bochs/config.h.in 2014-11-21 23:03:19 UTC (rev 12554)
+++ trunk/bochs/config.h.in 2014-11-22 11:43:40 UTC (rev 12555)
@@ -885,15 +885,15 @@
#define BX_SUPPORT_SOUNDLOW 0
#if BX_SUPPORT_SOUNDLOW
-// Determines which sound lowlevel class is to be used as the default.
+// Determines which sound lowlevel driver is to be used as the default.
// Currently the following are available:
-// bx_sound_alsa_c Output for Linux with ALSA PCM and sequencer interface
-// bx_sound_linux_c Output for Linux, to /dev/dsp and /dev/midi00
-// bx_sound_windows_c Output for Windows midi and wave mappers
-// bx_sound_osx_c Output for MacOSX midi and wave device
-// bx_sound_sdl_c Wave output with SDL
-// bx_sound_lowlevel_c Dummy functions, no output
-#define BX_SOUND_LOWLEVEL_C bx_sound_lowlevel_c
+// alsa Output for Linux with ALSA PCM and sequencer interface
+// oss Output for Linux, to /dev/dsp and /dev/midi00
+// win Output for Windows midi and wave mappers
+// osx Output for MacOSX midi and wave device
+// sdl Wave output with SDL/SDL2
+// dummy Dummy functions, no output
+#define BX_SOUND_LOWLEVEL_NAME "dummy"
// Use ALSA sound interface on Linux
#define BX_HAVE_ALSASOUND 0
#endif
Modified: trunk/bochs/configure.in
===================================================================
--- trunk/bochs/configure.in 2014-11-21 23:03:19 UTC (rev 12554)
+++ trunk/bochs/configure.in 2014-11-22 11:43:40 UTC (rev 12555)
@@ -1877,14 +1877,12 @@
case "$target" in
*-linux* | *-freebsd*)
SOUNDLOW_OBJS='soundlnx.o'
- AC_DEFINE(BX_SOUND_LOWLEVEL_C, bx_sound_linux_c)
soundlow_drivers="oss"
soundlow_default="oss"
bx_have_alsa=0
AC_CHECK_HEADER([alsa/asoundlib.h], [bx_have_alsa=1])
if test "$bx_have_alsa" = 1; then
SOUNDLOW_OBJS="$SOUNDLOW_OBJS soundalsa.o"
- AC_DEFINE(BX_SOUND_LOWLEVEL_C, bx_sound_alsa_c)
soundlow_default="alsa"
soundlow_drivers="alsa $soundlow_drivers"
AC_DEFINE(BX_HAVE_ALSASOUND, 1)
@@ -1897,28 +1895,24 @@
;;
*-pc-windows*)
SOUNDLOW_OBJS='soundwin.o'
- AC_DEFINE(BX_SOUND_LOWLEVEL_C, bx_sound_windows_c)
DEVICE_LINK_OPTS="$DEVICE_LINK_OPTS winmm.lib"
soundlow_drivers="win"
soundlow_default="win"
;;
*-cygwin* | *-mingw32*)
SOUNDLOW_OBJS='soundwin.o'
- AC_DEFINE(BX_SOUND_LOWLEVEL_C, bx_sound_windows_c)
DEVICE_LINK_OPTS="$DEVICE_LINK_OPTS -lwinmm"
soundlow_drivers="win"
soundlow_default="win"
;;
*-macosx* | *-macos* | *-apple-darwin*)
SOUNDLOW_OBJS='soundosx.o'
- AC_DEFINE(BX_SOUND_LOWLEVEL_C, bx_sound_osx_c)
DEVICE_LINK_OPTS="$DEVICE_LINK_OPTS -framework CoreServices -framework \
AudioUnit -framework AudioToolbox" soundlow_drivers="osx"
soundlow_default="osx"
;;
*)
SOUNDLOW_OBJS=''
- AC_DEFINE(BX_SOUND_LOWLEVEL_C, bx_sound_lowlevel_c)
soundlow_default="dummy"
;;
esac
@@ -1949,6 +1943,7 @@
AC_MSG_RESULT($soundlow_drivers)
AC_MSG_CHECKING(for default sound lowlevel module)
AC_MSG_RESULT($soundlow_default)
+ AC_DEFINE_UNQUOTED(BX_SOUND_LOWLEVEL_NAME, "$soundlow_default")
else
AC_DEFINE(BX_SUPPORT_SOUNDLOW, 0)
fi
Modified: trunk/bochs/iodev/sound/soundmod.cc
===================================================================
--- trunk/bochs/iodev/sound/soundmod.cc 2014-11-21 23:03:19 UTC (rev 12554)
+++ trunk/bochs/iodev/sound/soundmod.cc 2014-11-22 11:43:40 UTC (rev 12555)
@@ -79,11 +79,17 @@
void bx_soundmod_ctl_c::init()
{
+ static const char default_name[] = BX_SOUND_LOWLEVEL_NAME;
const char *driver = SIM->get_param_string(BXPN_SOUND_DRIVER)->getptr();
const char *waveout = SIM->get_param_string(BXPN_SOUND_WAVEOUT)->getptr();
const char *wavein = SIM->get_param_string(BXPN_SOUND_WAVEIN)->getptr();
- if (!strcmp(driver, "default")) {
- soundmod = new BX_SOUND_LOWLEVEL_C();
+
+ if (strcmp(driver, "default") == 0) {
+ driver = default_name;
+ }
+
+ if (strcmp(driver, "dummy") == 0) {
+ soundmod = new bx_sound_lowlevel_c();
#if BX_HAVE_ALSASOUND
} else if (!strcmp(driver, "alsa")) {
soundmod = new bx_sound_alsa_c();
@@ -104,8 +110,6 @@
} else if (!strcmp(driver, "win")) {
soundmod = new bx_sound_windows_c();
#endif
- } else if (!strcmp(driver, "dummy")) {
- soundmod = new bx_sound_lowlevel_c();
} else {
BX_PANIC(("unknown lowlevel sound driver '%s'", driver));
return;
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Bochs-cvs mailing list
Bochs-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bochs-cvs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic