Commit 8ff9cbf776ccb6306a8a0699bc4c8f5a8af7f922
1 parent
e7fb1406
Make mixer emulation a configure option (Jan Kiszka)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4783 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
3 changed files
with
14 additions
and
7 deletions
audio/mixeng.c
@@ -28,8 +28,6 @@ | @@ -28,8 +28,6 @@ | ||
28 | #define AUDIO_CAP "mixeng" | 28 | #define AUDIO_CAP "mixeng" |
29 | #include "audio_int.h" | 29 | #include "audio_int.h" |
30 | 30 | ||
31 | -#define NOVOL | ||
32 | - | ||
33 | /* 8 bit */ | 31 | /* 8 bit */ |
34 | #define ENDIAN_CONVERSION natural | 32 | #define ENDIAN_CONVERSION natural |
35 | #define ENDIAN_CONVERT(v) (v) | 33 | #define ENDIAN_CONVERT(v) (v) |
audio/mixeng_template.h
@@ -31,14 +31,14 @@ | @@ -31,14 +31,14 @@ | ||
31 | #define HALF (IN_MAX >> 1) | 31 | #define HALF (IN_MAX >> 1) |
32 | #endif | 32 | #endif |
33 | 33 | ||
34 | -#ifdef NOVOL | ||
35 | -#define VOL(a, b) a | ||
36 | -#else | 34 | +#ifdef CONFIG_MIXEMU |
37 | #ifdef FLOAT_MIXENG | 35 | #ifdef FLOAT_MIXENG |
38 | #define VOL(a, b) ((a) * (b)) | 36 | #define VOL(a, b) ((a) * (b)) |
39 | #else | 37 | #else |
40 | #define VOL(a, b) ((a) * (b)) >> 32 | 38 | #define VOL(a, b) ((a) * (b)) >> 32 |
41 | #endif | 39 | #endif |
40 | +#else | ||
41 | +#define VOL(a, b) a | ||
42 | #endif | 42 | #endif |
43 | 43 | ||
44 | #define ET glue (ENDIAN_CONVERSION, glue (_, IN_T)) | 44 | #define ET glue (ENDIAN_CONVERSION, glue (_, IN_T)) |
@@ -113,7 +113,7 @@ static void glue (glue (conv_, ET), _to_stereo) | @@ -113,7 +113,7 @@ static void glue (glue (conv_, ET), _to_stereo) | ||
113 | { | 113 | { |
114 | st_sample_t *out = dst; | 114 | st_sample_t *out = dst; |
115 | IN_T *in = (IN_T *) src; | 115 | IN_T *in = (IN_T *) src; |
116 | -#ifndef NOVOL | 116 | +#ifdef CONFIG_MIXEMU |
117 | if (vol->mute) { | 117 | if (vol->mute) { |
118 | mixeng_clear (dst, samples); | 118 | mixeng_clear (dst, samples); |
119 | return; | 119 | return; |
@@ -133,7 +133,7 @@ static void glue (glue (conv_, ET), _to_mono) | @@ -133,7 +133,7 @@ static void glue (glue (conv_, ET), _to_mono) | ||
133 | { | 133 | { |
134 | st_sample_t *out = dst; | 134 | st_sample_t *out = dst; |
135 | IN_T *in = (IN_T *) src; | 135 | IN_T *in = (IN_T *) src; |
136 | -#ifndef NOVOL | 136 | +#ifdef CONFIG_MIXEMU |
137 | if (vol->mute) { | 137 | if (vol->mute) { |
138 | mixeng_clear (dst, samples); | 138 | mixeng_clear (dst, samples); |
139 | return; | 139 | return; |
configure
@@ -114,6 +114,7 @@ build_docs="no" | @@ -114,6 +114,7 @@ build_docs="no" | ||
114 | uname_release="" | 114 | uname_release="" |
115 | curses="yes" | 115 | curses="yes" |
116 | nptl="yes" | 116 | nptl="yes" |
117 | +mixemu="no" | ||
117 | 118 | ||
118 | # OS specific | 119 | # OS specific |
119 | targetos=`uname -s` | 120 | targetos=`uname -s` |
@@ -337,6 +338,8 @@ for opt do | @@ -337,6 +338,8 @@ for opt do | ||
337 | ;; | 338 | ;; |
338 | --disable-nptl) nptl="no" | 339 | --disable-nptl) nptl="no" |
339 | ;; | 340 | ;; |
341 | + --enable-mixemu) mixemu="yes" | ||
342 | + ;; | ||
340 | *) echo "ERROR: unknown option $opt"; show_help="yes" | 343 | *) echo "ERROR: unknown option $opt"; show_help="yes" |
341 | ;; | 344 | ;; |
342 | esac | 345 | esac |
@@ -428,6 +431,7 @@ echo " --enable-alsa enable ALSA audio driver" | @@ -428,6 +431,7 @@ echo " --enable-alsa enable ALSA audio driver" | ||
428 | echo " --enable-esd enable EsoundD audio driver" | 431 | echo " --enable-esd enable EsoundD audio driver" |
429 | echo " --enable-fmod enable FMOD audio driver" | 432 | echo " --enable-fmod enable FMOD audio driver" |
430 | echo " --enable-dsound enable DirectSound audio driver" | 433 | echo " --enable-dsound enable DirectSound audio driver" |
434 | +echo " --enable-mixemu enable mixer emulation" | ||
431 | echo " --disable-brlapi disable BrlAPI" | 435 | echo " --disable-brlapi disable BrlAPI" |
432 | echo " --disable-vnc-tls disable TLS encryption for VNC server" | 436 | echo " --disable-vnc-tls disable TLS encryption for VNC server" |
433 | echo " --disable-curses disable curses output" | 437 | echo " --disable-curses disable curses output" |
@@ -839,6 +843,7 @@ echo "CoreAudio support $coreaudio" | @@ -839,6 +843,7 @@ echo "CoreAudio support $coreaudio" | ||
839 | echo "ALSA support $alsa" | 843 | echo "ALSA support $alsa" |
840 | echo "EsounD support $esd" | 844 | echo "EsounD support $esd" |
841 | echo "DSound support $dsound" | 845 | echo "DSound support $dsound" |
846 | +echo "Mixer emulation $mixemu" | ||
842 | if test "$fmod" = "yes"; then | 847 | if test "$fmod" = "yes"; then |
843 | if test -z $fmod_lib || test -z $fmod_inc; then | 848 | if test -z $fmod_lib || test -z $fmod_inc; then |
844 | echo | 849 | echo |
@@ -1067,6 +1072,10 @@ if test "$dsound" = "yes" ; then | @@ -1067,6 +1072,10 @@ if test "$dsound" = "yes" ; then | ||
1067 | echo "CONFIG_DSOUND=yes" >> $config_mak | 1072 | echo "CONFIG_DSOUND=yes" >> $config_mak |
1068 | echo "#define CONFIG_DSOUND 1" >> $config_h | 1073 | echo "#define CONFIG_DSOUND 1" >> $config_h |
1069 | fi | 1074 | fi |
1075 | +if test "$mixemu" = "yes" ; then | ||
1076 | + echo "CONFIG_MIXEMU=yes" >> $config_mak | ||
1077 | + echo "#define CONFIG_MIXEMU 1" >> $config_h | ||
1078 | +fi | ||
1070 | if test "$fmod" = "yes" ; then | 1079 | if test "$fmod" = "yes" ; then |
1071 | echo "CONFIG_FMOD=yes" >> $config_mak | 1080 | echo "CONFIG_FMOD=yes" >> $config_mak |
1072 | echo "CONFIG_FMOD_LIB=$fmod_lib" >> $config_mak | 1081 | echo "CONFIG_FMOD_LIB=$fmod_lib" >> $config_mak |