From 1f4893ce91c7abcde990d9db142afd8aaf3a9909 Mon Sep 17 00:00:00 2001 From: doursse Date: Sun, 21 May 2006 18:24:24 +0000 Subject: [PATCH] volume is between 0 and 1, not 0 and 100 git-svn-id: http://svn.enlightenment.org/svn/e/trunk/e17/libs/emotion@22817 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/modules/emotion_gstreamer.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/modules/emotion_gstreamer.c b/src/modules/emotion_gstreamer.c index 3d5bccf..ad2583f 100644 --- a/src/modules/emotion_gstreamer.c +++ b/src/modules/emotion_gstreamer.c @@ -1028,7 +1028,7 @@ em_audio_channel_mute_set(void *video, if (mute) g_object_set (G_OBJECT (volume), "volume", 0.0, NULL); else - g_object_set (G_OBJECT (volume), "volume", ev->volume / 10.0, NULL); + g_object_set (G_OBJECT (volume), "volume", ev->volume * 10.0, NULL); gst_object_unref (volume); } @@ -1054,13 +1054,13 @@ em_audio_channel_volume_set(void *video, if (vol < 0.0) vol = 0.0; - if (vol > 100.0) - vol = 100.0; + if (vol > 1.0) + vol = 1.0; ev->volume = vol; volume = gst_bin_get_by_name (GST_BIN (ev->pipeline), "volume"); if (!volume) return; g_object_set (G_OBJECT (volume), "volume", - vol / 10.0, NULL); + vol * 10.0, NULL); gst_object_unref (volume); } @@ -1559,7 +1559,7 @@ _em_audio_sink_create (Emotion_Gstreamer_Video *ev, int index) resample = gst_element_factory_make ("audioresample", NULL); volume = gst_element_factory_make ("volume", "volume"); g_object_get (G_OBJECT (volume), "volume", &vol, NULL); - ev->volume = vol * 10.0; + ev->volume = vol / 10.0; if (index == 1) sink = gst_element_factory_make ("autoaudiosink", NULL); -- 2.7.4