From 01f9f9e0db68f8acc48a32864a88eb3376c37e3d Mon Sep 17 00:00:00 2001 From: Latif Khalifa Date: Wed, 9 Jun 2010 08:28:27 +0000 Subject: [PATCH] Fixed saving of parcel music volume. git-svn-id: https://radegast.googlecode.com/svn/trunk@699 f7a694da-4d33-11de-9ad6-1127a62b9fcd --- Radegast/GUI/Consoles/MediaConsole.Designer.cs | 1 + Radegast/GUI/Consoles/MediaConsole.cs | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Radegast/GUI/Consoles/MediaConsole.Designer.cs b/Radegast/GUI/Consoles/MediaConsole.Designer.cs index b544ee4..2721aff 100644 --- a/Radegast/GUI/Consoles/MediaConsole.Designer.cs +++ b/Radegast/GUI/Consoles/MediaConsole.Designer.cs @@ -91,6 +91,7 @@ namespace Radegast this.volAudioStream.SmallChange = 2; this.volAudioStream.TabIndex = 0; this.volAudioStream.Value = 25; + this.volAudioStream.Scroll += new System.EventHandler(this.volAudioStream_Scroll); // // pnlParcelAudio // diff --git a/Radegast/GUI/Consoles/MediaConsole.cs b/Radegast/GUI/Consoles/MediaConsole.cs index 28a8d04..745fa7d 100644 --- a/Radegast/GUI/Consoles/MediaConsole.cs +++ b/Radegast/GUI/Consoles/MediaConsole.cs @@ -29,7 +29,7 @@ namespace Radegast if (value >= 0f && value < 1f) { m_audioVolume = value; - volAudioStream.Value = (int)(50f * value); + parcelStream.Volume = m_audioVolume; } } } @@ -76,6 +76,7 @@ namespace Radegast objVolume.Value = (int)(50f * instance.MediaManager.ObjectVolume); } + volAudioStream.Value = (int)(audioVolume * 50); instance.MediaManager.ObjectEnable = cbObjSoundEnable.Checked; configTimer = new System.Threading.Timer(SaveConfig, null, System.Threading.Timeout.Infinite, System.Threading.Timeout.Infinite); @@ -227,7 +228,7 @@ namespace Radegast configTimer.Change(saveConfigTimeout, System.Threading.Timeout.Infinite); lock (parcelMusicLock) if (parcelStream != null) - parcelStream.Volume = volAudioStream.Value / 50f; + audioVolume = volAudioStream.Value / 50f; } private void volObject_Scroll(object sender, EventArgs e) -- 2.11.0