diff options
| author | Lennart Poettering <lennart@poettering.net> | 2006-09-03 22:52:01 +0000 | 
|---|---|---|
| committer | Lennart Poettering <lennart@poettering.net> | 2006-09-03 22:52:01 +0000 | 
| commit | f1acb118e98a68fef1135ba7eff3c7caa8f66c74 (patch) | |
| tree | 846bdb6757e06d0b766c0d4b572bc2f20f974d2f /src/plugin.c | |
| parent | 43bacacd25701b2a3dd88e0962a532b5eb66e6ea (diff) | |
beep media player support (patch from Mario Izquierdo)
git-svn-id: file:///home/lennart/svn/public/xmms-pulse/trunk@55 ef929aba-56e2-0310-84e0-b7573d389508
Diffstat (limited to 'src/plugin.c')
| -rw-r--r-- | src/plugin.c | 47 | 
1 files changed, 44 insertions, 3 deletions
| diff --git a/src/plugin.c b/src/plugin.c index a489a84..c54163a 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -32,8 +32,17 @@  #include <limits.h>  #include <gtk/gtk.h> -#include <plugin.h> -#include <xmmsctrl.h> + +#ifdef HAVE_XMMS + #include <plugin.h> + #include <xmmsctrl.h> +#endif + +#ifdef HAVE_BMP + #include <plugin.h> + #include <beepctrl.h> +#endif +  #include <util.h>  #include <pulse/pulseaudio.h> @@ -587,8 +596,14 @@ static int pulse_open(AFormat fmt, int rate, int nch) {      }      pa_threaded_mainloop_lock(mainloop); -     + +#ifdef HAVE_XMMS          if (!(context = pa_context_new(pa_threaded_mainloop_get_api(mainloop), "XMMS"))) { +#endif + +#if HAVE_BMP +    if (!(context = pa_context_new(pa_threaded_mainloop_get_api(mainloop), "Beep-Media-Player"))) { +#endif          g_warning("Failed to allocate context");          goto unlock_and_fail;      } @@ -705,6 +720,7 @@ static void pulse_about(void) {      if (dialog != NULL)          return; +#ifdef HAVE_XMMS      dialog = xmms_show_message(              "About XMMS PulseAudio Output Plugin",              "XMMS PulseAudio Output Plugin\n\n " @@ -726,6 +742,31 @@ static void pulse_about(void) {              FALSE,              NULL,              NULL); +#endif + +#ifdef HAVE_BMP +    dialog = xmms_show_message( +            "About Beep_media-Player PulseAudio Output Plugin", +            "Beep-Media-Player PulseAudio Output Plugin\n\n " +            "This program is free software; you can redistribute it and/or modify\n" +            "it under the terms of the GNU General Public License as published by\n" +            "the Free Software Foundation; either version 2 of the License, or\n" +            "(at your option) any later version.\n" +            "\n" +            "This program is distributed in the hope that it will be useful,\n" +            "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" +            "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n" +            "GNU General Public License for more details.\n" +            "\n" +            "You should have received a copy of the GNU General Public License\n" +            "along with this program; if not, write to the Free Software\n" +            "Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,\n" +            "USA.", +            "OK", +            FALSE, +            NULL, +            NULL); +#endif      gtk_signal_connect(              GTK_OBJECT(dialog), | 
