/// </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
/// </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
{
// 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
{