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
audio/mixeng_template.h
... | ... | @@ -31,14 +31,14 @@ |
31 | 31 | #define HALF (IN_MAX >> 1) |
32 | 32 | #endif |
33 | 33 | |
34 | -#ifdef NOVOL | |
35 | -#define VOL(a, b) a | |
36 | -#else | |
34 | +#ifdef CONFIG_MIXEMU | |
37 | 35 | #ifdef FLOAT_MIXENG |
38 | 36 | #define VOL(a, b) ((a) * (b)) |
39 | 37 | #else |
40 | 38 | #define VOL(a, b) ((a) * (b)) >> 32 |
41 | 39 | #endif |
40 | +#else | |
41 | +#define VOL(a, b) a | |
42 | 42 | #endif |
43 | 43 | |
44 | 44 | #define ET glue (ENDIAN_CONVERSION, glue (_, IN_T)) |
... | ... | @@ -113,7 +113,7 @@ static void glue (glue (conv_, ET), _to_stereo) |
113 | 113 | { |
114 | 114 | st_sample_t *out = dst; |
115 | 115 | IN_T *in = (IN_T *) src; |
116 | -#ifndef NOVOL | |
116 | +#ifdef CONFIG_MIXEMU | |
117 | 117 | if (vol->mute) { |
118 | 118 | mixeng_clear (dst, samples); |
119 | 119 | return; |
... | ... | @@ -133,7 +133,7 @@ static void glue (glue (conv_, ET), _to_mono) |
133 | 133 | { |
134 | 134 | st_sample_t *out = dst; |
135 | 135 | IN_T *in = (IN_T *) src; |
136 | -#ifndef NOVOL | |
136 | +#ifdef CONFIG_MIXEMU | |
137 | 137 | if (vol->mute) { |
138 | 138 | mixeng_clear (dst, samples); |
139 | 139 | return; | ... | ... |
configure
... | ... | @@ -114,6 +114,7 @@ build_docs="no" |
114 | 114 | uname_release="" |
115 | 115 | curses="yes" |
116 | 116 | nptl="yes" |
117 | +mixemu="no" | |
117 | 118 | |
118 | 119 | # OS specific |
119 | 120 | targetos=`uname -s` |
... | ... | @@ -337,6 +338,8 @@ for opt do |
337 | 338 | ;; |
338 | 339 | --disable-nptl) nptl="no" |
339 | 340 | ;; |
341 | + --enable-mixemu) mixemu="yes" | |
342 | + ;; | |
340 | 343 | *) echo "ERROR: unknown option $opt"; show_help="yes" |
341 | 344 | ;; |
342 | 345 | esac |
... | ... | @@ -428,6 +431,7 @@ echo " --enable-alsa enable ALSA audio driver" |
428 | 431 | echo " --enable-esd enable EsoundD audio driver" |
429 | 432 | echo " --enable-fmod enable FMOD audio driver" |
430 | 433 | echo " --enable-dsound enable DirectSound audio driver" |
434 | +echo " --enable-mixemu enable mixer emulation" | |
431 | 435 | echo " --disable-brlapi disable BrlAPI" |
432 | 436 | echo " --disable-vnc-tls disable TLS encryption for VNC server" |
433 | 437 | echo " --disable-curses disable curses output" |
... | ... | @@ -839,6 +843,7 @@ echo "CoreAudio support $coreaudio" |
839 | 843 | echo "ALSA support $alsa" |
840 | 844 | echo "EsounD support $esd" |
841 | 845 | echo "DSound support $dsound" |
846 | +echo "Mixer emulation $mixemu" | |
842 | 847 | if test "$fmod" = "yes"; then |
843 | 848 | if test -z $fmod_lib || test -z $fmod_inc; then |
844 | 849 | echo |
... | ... | @@ -1067,6 +1072,10 @@ if test "$dsound" = "yes" ; then |
1067 | 1072 | echo "CONFIG_DSOUND=yes" >> $config_mak |
1068 | 1073 | echo "#define CONFIG_DSOUND 1" >> $config_h |
1069 | 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 | 1079 | if test "$fmod" = "yes" ; then |
1071 | 1080 | echo "CONFIG_FMOD=yes" >> $config_mak |
1072 | 1081 | echo "CONFIG_FMOD_LIB=$fmod_lib" >> $config_mak | ... | ... |