patches/sugar-toolkit-01-noalsa.diff
author jurikm
Sun, 12 Feb 2012 14:04:10 +0000
changeset 8245 383896da4129
parent 2328 4d4a2b8c4b57
permissions -rw-r--r--
SFEsauerbraten.spec: add IPS package name
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1980
953f5a70e4c9 2009-07 23 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
     1
--- sugar-toolkit-0.84.4/configure.ac-orig	2009-07-05 08:07:38.661236000 -0500
953f5a70e4c9 2009-07 23 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
     2
+++ sugar-toolkit-0.84.4/configure.ac	2009-07-05 08:22:53.096803000 -0500
953f5a70e4c9 2009-07 23 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
     3
@@ -19,7 +19,15 @@ AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(c
953f5a70e4c9 2009-07 23 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
     4
 
953f5a70e4c9 2009-07 23 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
     5
 AC_PATH_PROG(PYGTK_CODEGEN, pygtk-codegen-2.0, no)
953f5a70e4c9 2009-07 23 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
     6
 
953f5a70e4c9 2009-07 23 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
     7
-PKG_CHECK_MODULES(EXT, pygtk-2.0 gtk+-2.0 sm ice alsa)
953f5a70e4c9 2009-07 23 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
     8
+PKG_CHECK_MODULES(EXT, pygtk-2.0 gtk+-2.0 sm ice)
953f5a70e4c9 2009-07 23 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
     9
+
953f5a70e4c9 2009-07 23 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    10
+PKG_CHECK_MODULES(alsa,, 
953f5a70e4c9 2009-07 23 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    11
+	have_alsa=yes,
953f5a70e4c9 2009-07 23 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    12
+	have_alsa=no)
953f5a70e4c9 2009-07 23 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    13
+if test "x$have_alsa" = "xyes" ; then
953f5a70e4c9 2009-07 23 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    14
+  AC_DEFINE(HAVE_ALSA, [], [Define if we have ALSA])
953f5a70e4c9 2009-07 23 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    15
+fi
953f5a70e4c9 2009-07 23 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    16
+AM_CONDITIONAL(HAVE_ALSA, test x$have_alsa = xyes)
953f5a70e4c9 2009-07 23 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    17
 
953f5a70e4c9 2009-07 23 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    18
 PYGTK_DEFSDIR=`$PKG_CONFIG --variable=defsdir pygtk-2.0`
953f5a70e4c9 2009-07 23 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    19
 AC_SUBST(PYGTK_DEFSDIR)
953f5a70e4c9 2009-07 23 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    20
--- sugar-toolkit-0.84.4/src/sugar/Makefile.am-orig	2009-07-05 08:14:15.014655000 -0500
953f5a70e4c9 2009-07 23 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    21
+++ sugar-toolkit-0.84.4/src/sugar/Makefile.am	2009-07-05 08:24:34.580438000 -0500
953f5a70e4c9 2009-07 23 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    22
@@ -13,9 +13,13 @@ pkgpyexecdir = $(pythondir)/sugar
953f5a70e4c9 2009-07 23 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    23
 
953f5a70e4c9 2009-07 23 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    24
 pkgpyexec_LTLIBRARIES = _sugarext.la
953f5a70e4c9 2009-07 23 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    25
 
953f5a70e4c9 2009-07 23 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    26
+if HAVE_ALSA
953f5a70e4c9 2009-07 23 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    27
+ALSA_FLAGS="-DHAVE_ALSA"
953f5a70e4c9 2009-07 23 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    28
+endif
953f5a70e4c9 2009-07 23 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    29
+
953f5a70e4c9 2009-07 23 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    30
 _sugarext_la_CFLAGS = 		\
953f5a70e4c9 2009-07 23 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    31
-	-DHAVE_ALSA		\
953f5a70e4c9 2009-07 23 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    32
-        $(WARN_CFLAGS)		\
953f5a70e4c9 2009-07 23 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    33
+        $(ALSA_FLAGS)		\
953f5a70e4c9 2009-07 23 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    34
+       $(WARN_CFLAGS)		\
953f5a70e4c9 2009-07 23 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    35
 	$(EXT_CFLAGS)		\
953f5a70e4c9 2009-07 23 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    36
 	$(PYTHON_INCLUDES)
953f5a70e4c9 2009-07 23 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    37
 
2328
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
    38
--- sugar-toolkit-0.87.3/src/sugar/acme-volume-alsa.c-orig	2010-02-02 14:19:37.593373355 -0600
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
    39
+++ sugar-toolkit-0.87.3/src/sugar/acme-volume-alsa.c	2010-02-02 14:23:08.345907689 -0600
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
    40
@@ -26,7 +26,9 @@
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
    41
 
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
    42
 #include "acme-volume-alsa.h"
1980
953f5a70e4c9 2009-07 23 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    43
 
953f5a70e4c9 2009-07 23 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    44
+#ifdef HAVE_ALSA
2328
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
    45
 #include <alsa/asoundlib.h>
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
    46
+#endif
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
    47
 
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
    48
 #ifndef DEFAULT_CARD
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
    49
 #define DEFAULT_CARD "default"
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
    50
@@ -45,8 +47,10 @@ struct AcmeVolumeAlsaPrivate
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
    51
 {
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
    52
 	long pmin, pmax;
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
    53
 	gboolean has_mute, has_master;
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
    54
+#ifdef HAVE_ALSA
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
    55
 	snd_mixer_t *handle;
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
    56
 	snd_mixer_elem_t *elem;
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
    57
+#endif
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
    58
 	int saved_volume;
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
    59
 	guint timer_id;
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
    60
 };
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
    61
@@ -85,6 +89,7 @@ acme_volume_alsa_finalize (GObject *obje
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
    62
 static void
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
    63
 acme_volume_alsa_set_mute (AcmeVolume *vol, gboolean val)
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
    64
 {
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
    65
+#ifdef HAVE_ALSA
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
    66
 	AcmeVolumeAlsa *self = (AcmeVolumeAlsa *) vol;
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
    67
 
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
    68
 	if (acme_volume_alsa_open (self) == FALSE)
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
    69
@@ -111,11 +116,13 @@ acme_volume_alsa_set_mute (AcmeVolume *v
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
    70
 			acme_volume_alsa_set_volume (vol,
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
    71
 					self->_priv->saved_volume);
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
    72
 	}
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
    73
+#endif
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
    74
 }
1980
953f5a70e4c9 2009-07 23 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    75
 
2328
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
    76
 static gboolean
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
    77
 acme_volume_alsa_get_mute (AcmeVolume *vol)
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
    78
 {
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
    79
+#ifdef HAVE_ALSA
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
    80
 	AcmeVolumeAlsa *self = (AcmeVolumeAlsa *) vol;
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
    81
 	int ival;
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
    82
 
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
    83
@@ -135,11 +142,15 @@ acme_volume_alsa_get_mute (AcmeVolume *v
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
    84
 
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
    85
 		return (acme_volume_alsa_get_volume (vol) == 0);
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
    86
 	}
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
    87
+#else
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
    88
+        return FALSE;
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
    89
+#endif
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
    90
 }
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
    91
 
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
    92
 static int
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
    93
 acme_volume_alsa_get_volume (AcmeVolume *vol)
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
    94
 {
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
    95
+#ifdef HAVE_ALSA
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
    96
 	AcmeVolumeAlsa *self = (AcmeVolumeAlsa *) vol;
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
    97
 	long lval, rval;
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
    98
 	int tmp;
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
    99
@@ -160,11 +171,15 @@ acme_volume_alsa_get_volume (AcmeVolume 
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
   100
 	tmp = ROUND (alsa_vol);
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
   101
 
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
   102
 	return tmp;
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
   103
+#else
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
   104
+        return 0;
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
   105
+#endif
1980
953f5a70e4c9 2009-07 23 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
   106
 }
953f5a70e4c9 2009-07 23 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
   107
 
2328
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
   108
 static void
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
   109
 acme_volume_alsa_set_volume (AcmeVolume *vol, int val)
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
   110
 {
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
   111
+#ifdef HAVE_ALSA
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
   112
 	AcmeVolumeAlsa *self = (AcmeVolumeAlsa *) vol;
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
   113
 	float volume;
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
   114
 	int tmp;
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
   115
@@ -179,11 +194,13 @@ acme_volume_alsa_set_volume (AcmeVolume 
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
   116
 	snd_mixer_selem_set_playback_volume_all (self->_priv->elem, tmp);
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
   117
 
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
   118
 	acme_volume_alsa_close (self);
1980
953f5a70e4c9 2009-07 23 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
   119
+#endif
2328
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
   120
 }
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
   121
 
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
   122
 static int
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
   123
 acme_volume_alsa_get_threshold (AcmeVolume *vol)
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
   124
 {
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
   125
+#ifdef HAVE_ALSA
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
   126
 	AcmeVolumeAlsa *self = (AcmeVolumeAlsa *) vol;
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
   127
 	int steps;
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
   128
 
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
   129
@@ -194,11 +211,15 @@ acme_volume_alsa_get_threshold (AcmeVolu
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
   130
 
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
   131
 	steps = self->_priv->pmax - self->_priv->pmin;
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
   132
 	return (steps > 0) ? 100 / steps + 1 : 1;
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
   133
+#else
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
   134
+        return 1;
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
   135
+#endif
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
   136
 }
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
   137
 
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
   138
 static gboolean
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
   139
 acme_volume_alsa_close_real (AcmeVolumeAlsa *self)
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
   140
 {
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
   141
+#ifdef HAVE_ALSA
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
   142
 	if (self->_priv == NULL)
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
   143
 		return FALSE;
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
   144
 
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
   145
@@ -211,13 +232,14 @@ acme_volume_alsa_close_real (AcmeVolumeA
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
   146
 	}
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
   147
 
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
   148
 	self->_priv->timer_id = 0;
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
   149
-
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
   150
+#endif
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
   151
 	return FALSE;
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
   152
 }
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
   153
 
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
   154
 static gboolean
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
   155
 acme_volume_alsa_open (AcmeVolumeAlsa *self)
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
   156
 {
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
   157
+#ifdef HAVE_ALSA
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
   158
 	snd_mixer_selem_id_t *sid;
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
   159
 	snd_mixer_t *handle;
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
   160
 	snd_mixer_elem_t *elem;
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
   161
@@ -286,6 +308,7 @@ acme_volume_alsa_open (AcmeVolumeAlsa *s
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
   162
 
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
   163
 bail:
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
   164
 	acme_volume_alsa_close_real (self);
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
   165
+#endif
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
   166
 	return FALSE;
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
   167
 }
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
   168
 
4d4a2b8c4b57 2010-02-02 Brian Cameron <[email protected]>
yippi
parents: 1980
diff changeset
   169