--- qemu/audio/audio_int.h Sun Jul 10 22:21:02 2005 +++ qemu/audio/audio_int.h Wed Jun 1 00:08:36 2005 @@ -58,6 +58,9 @@ extern struct pcm_ops no_pcm_ops; extern struct audio_output_driver no_output_driver; +extern struct pcm_ops arts_pcm_ops; +extern struct audio_output_driver arts_output_driver; + extern struct pcm_ops oss_pcm_ops; extern struct audio_output_driver oss_output_driver; --- qemu/audio/audio.c Sun Jul 10 22:21:27 2005 +++ qemu/audio/audio.c Wed Jun 1 00:08:05 2005 @@ -776,6 +776,9 @@ } static struct audio_output_driver *drvtab[] = { +#ifdef CONFIG_ARTS + &arts_output_driver, +#endif #ifdef CONFIG_OSS &oss_output_driver, #endif --- qemu/Makefile.target Sun Jul 10 22:25:58 2005 +++ qemu/Makefile.target Wed Jul 6 23:40:55 2005 @@ -324,6 +324,10 @@ ifdef CONFIG_OSS AUDIODRV += ossaudio.o endif +ifdef CONFIG_ARTS +AUDIODRV += artsaudio.o +LIBS += $(CONFIG_ARTS_LIB) +endif pc.o: DEFINES := -DUSE_SB16 $(DEFINES) @@ -412,6 +416,9 @@ sdlaudio.o: sdlaudio.c $(CC) $(CFLAGS) $(DEFINES) $(SDL_CFLAGS) -c -o $@ $< + +artsaudio.o: artsaudio.c + $(CC) $(CFLAGS) $(DEFINES) $(CONFIG_ARTS_INC) -c -o $@ $< depend: $(SRCS) $(CC) -MM $(CFLAGS) $(DEFINES) $^ 1>.depend --- qemu/configure Sun Jul 10 22:29:03 2005 +++ qemu/configure Sun Jun 12 17:44:24 2005 @@ -77,6 +77,9 @@ gdbstub="yes" slirp="yes" adlib="no" +arts="no" +arts_lib="" +arts_inc="" oss="no" fmod="no" fmod_lib="" @@ -186,6 +189,12 @@ ;; --disable-slirp) slirp="no" ;; + --enable-arts) arts="yes" + ;; + --arts-lib=*) arts_lib=`echo $opt | cut -d '=' -f 2` + ;; + --arts-inc=*) arts_inc=`echo $opt | cut -d '=' -f 2` + ;; --enable-adlib) adlib="yes" ;; --disable-kqemu) kqemu="no" @@ -273,6 +282,40 @@ have_gcc3_options="yes" fi +if [ "$arts" = "yes" ]; then + +#dont bother with artsc-config check if both are given +if [ "$arts_lib" = "" -o "$arts_inc" = "" ]; then + +if which artsc-config > /dev/null ; then + +if test -z "$arts_lib"; then + +arts_lib=`artsc-config --libs` + +fi + +if test -z "$arts_inc"; then + +arts_inc=`artsc-config --cflags` + +else + +arts_inc="-I$arts_inc" + +fi + +else + + echo "artsc-config not found. Specify library and include dir manually." + arts="no" + +fi # artsc-config + +fi + +fi # arts + ########################################## # SDL probe @@ -512,6 +555,11 @@ echo -n " (lib='$fmod_lib' include='$fmod_inc')" fi echo "" +echo -n "Arts support $arts" +if test $arts = "yes"; then + echo -n " (lib='$arts_lib' include='$arts_inc')" +fi +echo "" echo "kqemu $kqemu" echo "qvm86 $qvm86" if test $kernel_module = "yes" -a $linux = "yes"; then @@ -636,6 +684,12 @@ if test "$oss" = "yes" ; then echo "CONFIG_OSS=yes" >> $config_mak echo "#define CONFIG_OSS 1" >> $config_h +fi +if test "$arts" = "yes" ; then + echo "CONFIG_ARTS=yes" >> $config_mak + echo "CONFIG_ARTS_LIB=$arts_lib" >> $config_mak + echo "CONFIG_ARTS_INC=$arts_inc" >> $config_mak + echo "#define CONFIG_ARTS 1" >> $config_h fi if test "$fmod" = "yes" ; then echo "CONFIG_FMOD=yes" >> $config_mak