[banshee: 4/7] [Banshee.GStreamer] Explicitly set Volume in Initialize.



commit 625fa9902cad36d52b62adc1e2d9bae6c8fc413e
Author: Christopher James Halse Rogers <chrishr src gnome org>
Date:   Sun Mar 14 17:11:18 2010 +1100

    [Banshee.GStreamer] Explicitly set Volume in Initialize.

 .../Banshee.GStreamer/PlayerEngine.cs              |   12 +-----------
 1 files changed, 1 insertions(+), 11 deletions(-)
---
diff --git a/src/Backends/Banshee.GStreamer/Banshee.GStreamer/PlayerEngine.cs b/src/Backends/Banshee.GStreamer/Banshee.GStreamer/PlayerEngine.cs
index 30e9ce7..3d203bd 100644
--- a/src/Backends/Banshee.GStreamer/Banshee.GStreamer/PlayerEngine.cs
+++ b/src/Backends/Banshee.GStreamer/Banshee.GStreamer/PlayerEngine.cs
@@ -77,7 +77,6 @@ namespace Banshee.GStreamer
         private uint GST_STREAM_ERROR = 0;
 
         private HandleRef handle;
-        private bool initialized;
 
         private BansheePlayerEosCallback eos_callback;
         private BansheePlayerErrorCallback error_callback;
@@ -95,7 +94,6 @@ namespace Banshee.GStreamer
         private SafeUri pending_uri;
 
         private bool buffering_finished;
-        private int pending_volume = -1;
         private bool xid_is_set = false;
 
         private bool gapless_enabled;
@@ -178,12 +176,9 @@ namespace Banshee.GStreamer
                 throw new ApplicationException (Catalog.GetString ("Could not initialize GStreamer library"));
             }
 
-            initialized = true;
             OnStateChanged (PlayerState.Ready);
 
-            if (pending_volume >= 0) {
-                Volume = (ushort)pending_volume;
-            }
+            Volume = (ushort)PlayerEngineService.VolumeSchema.Get ();
 
             InstallPreferences ();
             ReplayGainEnabled = ReplayGainEnabledSchema.Get ();
@@ -517,11 +512,6 @@ namespace Banshee.GStreamer
         public override ushort Volume {
             get { return (ushort)Math.Round (bp_get_volume (handle) * 100.0); }
             set {
-                if (!initialized) {
-                    pending_volume = value;
-                    return;
-                }
-
                 bp_set_volume (handle, value / 100.0);
                 OnEventChanged (PlayerEvent.Volume);
             }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]