Make mixer emulation a configure option (Jan Kiszka)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4783 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
e7fb1406b0
commit
8ff9cbf776
@ -28,8 +28,6 @@
|
|||||||
#define AUDIO_CAP "mixeng"
|
#define AUDIO_CAP "mixeng"
|
||||||
#include "audio_int.h"
|
#include "audio_int.h"
|
||||||
|
|
||||||
#define NOVOL
|
|
||||||
|
|
||||||
/* 8 bit */
|
/* 8 bit */
|
||||||
#define ENDIAN_CONVERSION natural
|
#define ENDIAN_CONVERSION natural
|
||||||
#define ENDIAN_CONVERT(v) (v)
|
#define ENDIAN_CONVERT(v) (v)
|
||||||
|
@ -31,14 +31,14 @@
|
|||||||
#define HALF (IN_MAX >> 1)
|
#define HALF (IN_MAX >> 1)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef NOVOL
|
#ifdef CONFIG_MIXEMU
|
||||||
#define VOL(a, b) a
|
|
||||||
#else
|
|
||||||
#ifdef FLOAT_MIXENG
|
#ifdef FLOAT_MIXENG
|
||||||
#define VOL(a, b) ((a) * (b))
|
#define VOL(a, b) ((a) * (b))
|
||||||
#else
|
#else
|
||||||
#define VOL(a, b) ((a) * (b)) >> 32
|
#define VOL(a, b) ((a) * (b)) >> 32
|
||||||
#endif
|
#endif
|
||||||
|
#else
|
||||||
|
#define VOL(a, b) a
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define ET glue (ENDIAN_CONVERSION, glue (_, IN_T))
|
#define ET glue (ENDIAN_CONVERSION, glue (_, IN_T))
|
||||||
@ -113,7 +113,7 @@ static void glue (glue (conv_, ET), _to_stereo)
|
|||||||
{
|
{
|
||||||
st_sample_t *out = dst;
|
st_sample_t *out = dst;
|
||||||
IN_T *in = (IN_T *) src;
|
IN_T *in = (IN_T *) src;
|
||||||
#ifndef NOVOL
|
#ifdef CONFIG_MIXEMU
|
||||||
if (vol->mute) {
|
if (vol->mute) {
|
||||||
mixeng_clear (dst, samples);
|
mixeng_clear (dst, samples);
|
||||||
return;
|
return;
|
||||||
@ -133,7 +133,7 @@ static void glue (glue (conv_, ET), _to_mono)
|
|||||||
{
|
{
|
||||||
st_sample_t *out = dst;
|
st_sample_t *out = dst;
|
||||||
IN_T *in = (IN_T *) src;
|
IN_T *in = (IN_T *) src;
|
||||||
#ifndef NOVOL
|
#ifdef CONFIG_MIXEMU
|
||||||
if (vol->mute) {
|
if (vol->mute) {
|
||||||
mixeng_clear (dst, samples);
|
mixeng_clear (dst, samples);
|
||||||
return;
|
return;
|
||||||
|
9
configure
vendored
9
configure
vendored
@ -114,6 +114,7 @@ build_docs="no"
|
|||||||
uname_release=""
|
uname_release=""
|
||||||
curses="yes"
|
curses="yes"
|
||||||
nptl="yes"
|
nptl="yes"
|
||||||
|
mixemu="no"
|
||||||
|
|
||||||
# OS specific
|
# OS specific
|
||||||
targetos=`uname -s`
|
targetos=`uname -s`
|
||||||
@ -337,6 +338,8 @@ for opt do
|
|||||||
;;
|
;;
|
||||||
--disable-nptl) nptl="no"
|
--disable-nptl) nptl="no"
|
||||||
;;
|
;;
|
||||||
|
--enable-mixemu) mixemu="yes"
|
||||||
|
;;
|
||||||
*) echo "ERROR: unknown option $opt"; show_help="yes"
|
*) echo "ERROR: unknown option $opt"; show_help="yes"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@ -428,6 +431,7 @@ echo " --enable-alsa enable ALSA audio driver"
|
|||||||
echo " --enable-esd enable EsoundD audio driver"
|
echo " --enable-esd enable EsoundD audio driver"
|
||||||
echo " --enable-fmod enable FMOD audio driver"
|
echo " --enable-fmod enable FMOD audio driver"
|
||||||
echo " --enable-dsound enable DirectSound audio driver"
|
echo " --enable-dsound enable DirectSound audio driver"
|
||||||
|
echo " --enable-mixemu enable mixer emulation"
|
||||||
echo " --disable-brlapi disable BrlAPI"
|
echo " --disable-brlapi disable BrlAPI"
|
||||||
echo " --disable-vnc-tls disable TLS encryption for VNC server"
|
echo " --disable-vnc-tls disable TLS encryption for VNC server"
|
||||||
echo " --disable-curses disable curses output"
|
echo " --disable-curses disable curses output"
|
||||||
@ -839,6 +843,7 @@ echo "CoreAudio support $coreaudio"
|
|||||||
echo "ALSA support $alsa"
|
echo "ALSA support $alsa"
|
||||||
echo "EsounD support $esd"
|
echo "EsounD support $esd"
|
||||||
echo "DSound support $dsound"
|
echo "DSound support $dsound"
|
||||||
|
echo "Mixer emulation $mixemu"
|
||||||
if test "$fmod" = "yes"; then
|
if test "$fmod" = "yes"; then
|
||||||
if test -z $fmod_lib || test -z $fmod_inc; then
|
if test -z $fmod_lib || test -z $fmod_inc; then
|
||||||
echo
|
echo
|
||||||
@ -1067,6 +1072,10 @@ if test "$dsound" = "yes" ; then
|
|||||||
echo "CONFIG_DSOUND=yes" >> $config_mak
|
echo "CONFIG_DSOUND=yes" >> $config_mak
|
||||||
echo "#define CONFIG_DSOUND 1" >> $config_h
|
echo "#define CONFIG_DSOUND 1" >> $config_h
|
||||||
fi
|
fi
|
||||||
|
if test "$mixemu" = "yes" ; then
|
||||||
|
echo "CONFIG_MIXEMU=yes" >> $config_mak
|
||||||
|
echo "#define CONFIG_MIXEMU 1" >> $config_h
|
||||||
|
fi
|
||||||
if test "$fmod" = "yes" ; then
|
if test "$fmod" = "yes" ; then
|
||||||
echo "CONFIG_FMOD=yes" >> $config_mak
|
echo "CONFIG_FMOD=yes" >> $config_mak
|
||||||
echo "CONFIG_FMOD_LIB=$fmod_lib" >> $config_mak
|
echo "CONFIG_FMOD_LIB=$fmod_lib" >> $config_mak
|
||||||
|
Loading…
Reference in New Issue
Block a user