[gnome-control-center] sound: Use PulseAudio's implementation of pa_cvolume_set_position()
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] sound: Use PulseAudio's implementation of pa_cvolume_set_position()
- Date: Wed, 11 Jul 2012 15:26:56 +0000 (UTC)
commit 89fbf2b35bfef9d56e9109745f040158a5594b60
Author: Bastien Nocera <hadess hadess net>
Date: Wed Jul 11 16:26:28 2012 +0100
sound: Use PulseAudio's implementation of pa_cvolume_set_position()
panels/sound/gvc-balance-bar.c | 23 +----------------------
1 files changed, 1 insertions(+), 22 deletions(-)
---
diff --git a/panels/sound/gvc-balance-bar.c b/panels/sound/gvc-balance-bar.c
index a24174a..e6f10d4 100644
--- a/panels/sound/gvc-balance-bar.c
+++ b/panels/sound/gvc-balance-bar.c
@@ -477,27 +477,6 @@ on_scale_scroll_event (GtkWidget *widget,
return TRUE;
}
-/* FIXME remove when we depend on a newer PA */
-static pa_cvolume *
-gvc_pa_cvolume_set_position (pa_cvolume *cv, const pa_channel_map *map, pa_channel_position_t t, pa_volume_t v) {
- unsigned c;
- gboolean good = FALSE;
-
- g_assert(cv);
- g_assert(map);
-
- g_return_val_if_fail(pa_cvolume_compatible_with_channel_map(cv, map), NULL);
- g_return_val_if_fail(t < PA_CHANNEL_POSITION_MAX, NULL);
-
- for (c = 0; c < map->channels; c++)
- if (map->map[c] == t) {
- cv->values[c] = v;
- good = TRUE;
- }
-
- return good ? cv : NULL;
-}
-
static void
on_adjustment_value_changed (GtkAdjustment *adjustment,
GvcBalanceBar *bar)
@@ -522,7 +501,7 @@ on_adjustment_value_changed (GtkAdjustment *adjustment,
pa_cvolume_set_fade (&cv, pa_map, val);
break;
case BALANCE_TYPE_LFE:
- gvc_pa_cvolume_set_position (&cv, pa_map, PA_CHANNEL_POSITION_LFE, val);
+ pa_cvolume_set_position (&cv, pa_map, PA_CHANNEL_POSITION_LFE, val);
break;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]