OSDN Git Service

Un-disable volume control for inworld sounds. It seems to be working now
authorMojito Sorbet <mojitotech@gmail.com>
Sun, 6 Jun 2010 17:05:55 +0000 (17:05 +0000)
committerMojito Sorbet <mojitotech@gmail.com>
Sun, 6 Jun 2010 17:05:55 +0000 (17:05 +0000)
git-svn-id: https://radegast.googlecode.com/svn/trunk@692 f7a694da-4d33-11de-9ad6-1127a62b9fcd

Radegast/Core/Media/BufferSound.cs
Radegast/Core/Media/MediaManager.cs

index f84bc4c..a1e1501 100644 (file)
@@ -150,7 +150,10 @@ namespace Radegast.Media
         /// </summary>\r
         public static void AdjustVolumes()\r
         {\r
-            foreach (BufferSound s in allBuffers.Values)\r
+            // Make a list from the dictionary so we do not get a deadlock\r
+            List<BufferSound> list = new List<BufferSound>(allBuffers.Values);\r
+\r
+            foreach (BufferSound s in list)\r
             {\r
                 s.AdjustVolume();\r
             }\r
@@ -161,8 +164,7 @@ namespace Radegast.Media
         /// </summary>\r
         private void AdjustVolume()\r
         {\r
-            //TODO This is disabled until we find why FMOD objects to the handle\r
-            //            Volume = volumeSetting * AllObjectVolume;\r
+            Volume = volumeSetting * AllObjectVolume;\r
         }\r
 \r
         // A simpler constructor used by PreFetchSound.\r
index 9ec5dbe..b4e1133 100644 (file)
@@ -495,10 +495,8 @@ namespace Radegast.Media
             {
                 // Exists already, so modify existing sound.
                 BufferSound snd = allBuffers[p.ID];
-                /* TODO  These cause INVALID_HANDLE errors.  Removed until we find why
                 snd.Volume = p.SoundGain * ObjectVolume;
                 snd.Position = fullPosition;
-                */
             }
             else
             {