# HG changeset patch # User Nathan Walp # Date 1045256252 0 # Node ID 4b1e24835bbf29266973ea4476e4067d10dbc835 # Parent 3fef2d45dce046255920342b94621e5544ebdad0 [gaim-migrate @ 4864] put NAS sound support back in, and re-wrote a lot of the libao stuff this should mostly put an end to people having to make a ~/.libao file committer: Tailor Script diff -r 3fef2d45dce0 -r 4b1e24835bbf configure.ac --- a/configure.ac Wed Feb 12 17:16:16 2003 +0000 +++ b/configure.ac Fri Feb 14 20:57:32 2003 +0000 @@ -123,6 +123,7 @@ [Loads static protocol plugin module initialization functions.]) AC_ARG_ENABLE(audio, [ --disable-audio compile without libao/libaudiofile for sound playing],,enable_audio=yes) +AC_ARG_ENABLE(nas, [ --enable-nas enable NAS (Network Audio System) support],,enable_nas=no) AC_ARG_ENABLE(plugins, [ --disable-plugins compile without plugin support],,enable_plugins=yes) AC_ARG_ENABLE(perl, [ --disable-perl compile without perl scripting],,enable_perl=yes) AC_ARG_ENABLE(gtkspell, [ --disable-gtkspell compile without GtkSpell automatic spell checking],,enable_gtkspell=yes) @@ -271,13 +272,18 @@ fi fi +if test "$enable_nas" = yes ; then + AC_DEFINE(USE_NAS_AUDIO, 1, [Define if we have NAS sound support.]) + SOUND_LIBS="$SOUND_LIBS -laudio -lXt" +fi + if test "$enable_audio" = yes ; then GAIM_PATH_AO(found_ao_lib=true) AM_PATH_AUDIOFILE([0.2.0], found_af_lib=true) if test "$found_ao_lib" = "true" -a "$found_af_lib" = "true"; then - SOUND_LIBS="$AO_LIBS $AUDIOFILE_LIBS" + SOUND_LIBS="$SOUND_LIBS $AO_LIBS $AUDIOFILE_LIBS" AC_SUBST(SOUND_LIBS) AC_DEFINE(USE_AO, 1, [Define if we're using libao and libaudiofile for sound playing]) enable_audio=yes @@ -421,6 +427,7 @@ echo Build with Plugin support..... : $enable_plugins echo Build with Perl support....... : $enable_perl echo Build with Audio support...... : $enable_audio +echo Build with NAS support........ : $enable_nas echo Build with GtkSpell support... : $enable_gtkspell echo echo Use XScreenSaver Extension.... : $enable_xss diff -r 3fef2d45dce0 -r 4b1e24835bbf configure.in --- a/configure.in Wed Feb 12 17:16:16 2003 +0000 +++ b/configure.in Fri Feb 14 20:57:32 2003 +0000 @@ -113,6 +113,7 @@ [Loads static protocol plugin module initialization functions.]) AC_ARG_ENABLE(audio, [ --disable-audio compile without libao/libaudiofile for sound playing],,enable_audio=yes) +AC_ARG_ENABLE(nas, [ --enable-nas enable NAS (Network Audio System) support],,enable_nas=no) AC_ARG_ENABLE(plugins, [ --disable-plugins compile without plugin support],,enable_plugins=yes) AC_ARG_ENABLE(perl, [ --disable-perl compile without perl scripting],,enable_perl=yes) AC_ARG_ENABLE(gtkspell, [ --disable-gtkspell compile without GtkSpell automatic spell checking],,enable_gtkspell=yes) @@ -245,13 +246,18 @@ fi fi +if test "$enable_nas" = yes ; then + AC_DEFINE(USE_NAS_AUDIO, 1, [Define if we have NAS sound support.]) + SOUND_LIBS="$SOUND_LIBS -laudio -lXt" +fi + if test "$enable_audio" = yes ; then GAIM_PATH_AO(found_ao_lib=true) AM_PATH_AUDIOFILE([0.2.0], found_af_lib=true) if test "$found_ao_lib" = "true" -a "$found_af_lib" = "true"; then - SOUND_LIBS="$AO_LIBS $AUDIOFILE_LIBS" + SOUND_LIBS="$SOUND_LIBS $AO_LIBS $AUDIOFILE_LIBS" AC_SUBST(SOUND_LIBS) AC_DEFINE(USE_AO, 1, [Define if we're using libao and libaudiofile for sound playing]) enable_audio=yes @@ -397,6 +403,7 @@ echo Build with Plugin support..... : $enable_plugins echo Build with Perl support....... : $enable_perl echo Build with Audio support...... : $enable_audio +echo Build with NAS support........ : $enable_nas echo Build with GtkSpell support... : $enable_gtkspell echo echo Use XScreenSaver Extension.... : $enable_xss diff -r 3fef2d45dce0 -r 4b1e24835bbf src/gaim.h --- a/src/gaim.h Wed Feb 12 17:16:16 2003 +0000 +++ b/src/gaim.h Fri Feb 14 20:57:32 2003 +0000 @@ -308,7 +308,7 @@ #define OPT_SOUND_CHAT_YOU_SAY 0x00001000 #define OPT_SOUND_NORMAL 0x00002000 #define OPT_SOUND_NAS 0x00004000 -#define OPT_SOUND_ARTSC 0x00008000 +#define OPT_SOUND_ARTS 0x00008000 #define OPT_SOUND_ESD 0x00010000 #define OPT_SOUND_CMD 0x00020000 #define OPT_SOUND_CHAT_NICK 0x00040000 diff -r 3fef2d45dce0 -r 4b1e24835bbf src/gaimrc.c --- a/src/gaimrc.c Wed Feb 12 17:16:16 2003 +0000 +++ b/src/gaimrc.c Fri Feb 14 20:57:32 2003 +0000 @@ -758,6 +758,7 @@ font_options = atoi(p->value[0]); } else if (!strcmp(p->option, "sound_options")) { sound_options = atoi(p->value[0]); + gaim_sound_change_output_method(); } else if (!strcmp(p->option, "away_options")) { away_options = atoi(p->value[0]); away_resend = atoi(p->value[1]); @@ -799,7 +800,8 @@ } /* this is where we do bugs and compatibility stuff */ - if (!(sound_options & (OPT_SOUND_BEEP | OPT_SOUND_NORMAL | OPT_SOUND_CMD))) + if (!(sound_options & (OPT_SOUND_BEEP | OPT_SOUND_NORMAL | OPT_SOUND_ESD + | OPT_SOUND_ARTS | OPT_SOUND_NAS | OPT_SOUND_CMD))) sound_options |= OPT_SOUND_NORMAL; if (conv_size.width == 0 && @@ -822,7 +824,7 @@ if (!read_logging) { logging_options = 0; if (general_options & OPT_GEN_LOG_ALL) - logging_options |= OPT_LOG_CONVOS | OPT_LOG_CHATS; + logging_options |= OPT_LOG_CONVOS | OPT_LOG_CHATS; if (general_options & OPT_GEN_STRIP_HTML) logging_options |= OPT_LOG_STRIP_HTML; } @@ -1232,7 +1234,8 @@ OPT_SOUND_RECV | OPT_SOUND_SEND | OPT_SOUND_SILENT_SIGNON | - OPT_SOUND_NORMAL; + OPT_SOUND_NORMAL | + OPT_SOUND_NAS; #ifdef USE_SCREENSAVER report_idle = IDLE_SCREENSAVER; diff -r 3fef2d45dce0 -r 4b1e24835bbf src/main.c --- a/src/main.c Wed Feb 12 17:16:16 2003 +0000 +++ b/src/main.c Fri Feb 14 20:57:32 2003 +0000 @@ -530,8 +530,6 @@ setup_stock(); - gaim_sound_init(); - #ifndef _WIN32 /* use the nice PNG icon for all the windows */ icon_path = g_build_filename(DATADIR, "pixmaps", "gaim.png", NULL); diff -r 3fef2d45dce0 -r 4b1e24835bbf src/prefs.c --- a/src/prefs.c Wed Feb 12 17:16:16 2003 +0000 +++ b/src/prefs.c Fri Feb 14 20:57:32 2003 +0000 @@ -986,11 +986,16 @@ #ifndef _WIN32 vbox = make_frame (ret, _("Sound Method")); dd = gaim_dropdown(vbox, _("_Method"), &sound_options, OPT_SOUND_BEEP | - OPT_SOUND_NORMAL | - OPT_SOUND_CMD, + OPT_SOUND_ESD | OPT_SOUND_ARTS | OPT_SOUND_NAS | + OPT_SOUND_NORMAL | OPT_SOUND_CMD, _("Console beep"), OPT_SOUND_BEEP, #ifdef USE_AO _("Automatic"), OPT_SOUND_NORMAL, + "ESD", OPT_SOUND_ESD, + "Arts", OPT_SOUND_ARTS, +#endif +#ifdef USE_NAS_AUDIO + "NAS", OPT_SOUND_NAS, #endif _("Command"), OPT_SOUND_CMD, NULL); gtk_size_group_add_widget(sg, dd); @@ -2300,6 +2305,7 @@ gtk_widget_set_sensitive(sndcmd, TRUE); else gtk_widget_set_sensitive(sndcmd, FALSE); + gaim_sound_change_output_method(); } else if (option == (int*)&im_options) { if (clear == (OPT_IM_SIDE_TAB | OPT_IM_BR_TAB)) gaim_gtkconv_update_tabs(); diff -r 3fef2d45dce0 -r 4b1e24835bbf src/sound.c --- a/src/sound.c Wed Feb 12 17:16:16 2003 +0000 +++ b/src/sound.c Fri Feb 14 20:57:32 2003 +0000 @@ -28,23 +28,20 @@ #include #ifndef _WIN32 -#include -#include -#include #include #else #include #include #endif -#include -#include -#include - #ifdef USE_AO #include #include #endif /* USE_AO */ +#ifdef USE_NAS_AUDIO +#include