[banshee] [Banshee.GStreamer] Fix initial volume setting
- From: Gabriel Burt <gburt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee] [Banshee.GStreamer] Fix initial volume setting
- Date: Thu, 11 Mar 2010 00:57:57 +0000 (UTC)
commit 3159f8900f88b0044b3c8006f3004d0e6f041fab
Author: Gabriel Burt <gabriel burt gmail com>
Date: Wed Mar 10 16:57:41 2010 -0800
[Banshee.GStreamer] Fix initial volume setting
.../Banshee.GStreamer/PlayerEngine.cs | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/Backends/Banshee.GStreamer/Banshee.GStreamer/PlayerEngine.cs b/src/Backends/Banshee.GStreamer/Banshee.GStreamer/PlayerEngine.cs
index 530fa67..3f22c3f 100644
--- a/src/Backends/Banshee.GStreamer/Banshee.GStreamer/PlayerEngine.cs
+++ b/src/Backends/Banshee.GStreamer/Banshee.GStreamer/PlayerEngine.cs
@@ -76,6 +76,7 @@ namespace Banshee.GStreamer
private uint GST_STREAM_ERROR = 0;
private HandleRef handle;
+ private bool initialized;
private BansheePlayerEosCallback eos_callback;
private BansheePlayerErrorCallback error_callback;
@@ -173,6 +174,7 @@ namespace Banshee.GStreamer
throw new ApplicationException (Catalog.GetString ("Could not initialize GStreamer library"));
}
+ initialized = true;
OnStateChanged (PlayerState.Ready);
if (pending_volume >= 0) {
@@ -507,7 +509,7 @@ namespace Banshee.GStreamer
public override ushort Volume {
get { return (ushort)Math.Round (bp_get_volume (handle) * 100.0); }
set {
- if ((IntPtr)handle == IntPtr.Zero) {
+ if (!initialized) {
pending_volume = value;
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]