[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [22874] branches/blender2.5/blender/source /blender: 2.5 Sound: Bugfixes.

Joerg Mueller nexyon at gmail.com
Sun Aug 30 01:13:27 CEST 2009


Revision: 22874
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=22874
Author:   nexyon
Date:     2009-08-30 01:13:27 +0200 (Sun, 30 Aug 2009)

Log Message:
-----------
2.5 Sound: Bugfixes.

Modified Paths:
--------------
    branches/blender2.5/blender/source/blender/blenloader/intern/readfile.c
    branches/blender2.5/blender/source/blender/editors/space_logic/logic_window.c

Modified: branches/blender2.5/blender/source/blender/blenloader/intern/readfile.c
===================================================================
--- branches/blender2.5/blender/source/blender/blenloader/intern/readfile.c	2009-08-29 23:05:46 UTC (rev 22873)
+++ branches/blender2.5/blender/source/blender/blenloader/intern/readfile.c	2009-08-29 23:13:27 UTC (rev 22874)
@@ -5070,9 +5070,6 @@
 
 	sound->packedfile = direct_link_packedfile(fd, sound->packedfile);
 	sound->newpackedfile = direct_link_packedfile(fd, sound->newpackedfile);
-
-	if(sound->cache)
-		sound_cache(sound, 1);
 }
 
 static void lib_link_sound(FileData *fd, Main *main)
@@ -5086,6 +5083,9 @@
 			sound->ipo= newlibadr_us(fd, sound->id.lib, sound->ipo); // XXX depreceated - old animation system
 			
 			sound_load(main, sound);
+
+			if(sound->cache)
+				sound_cache(sound, 1);
 		}
 		sound= sound->id.next;
 	}

Modified: branches/blender2.5/blender/source/blender/editors/space_logic/logic_window.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/space_logic/logic_window.c	2009-08-29 23:05:46 UTC (rev 22873)
+++ branches/blender2.5/blender/source/blender/editors/space_logic/logic_window.c	2009-08-29 23:13:27 UTC (rev 22874)
@@ -28,6 +28,7 @@
 
 #include <string.h>
 #include <stdio.h>
+#include <float.h>
 
 #include "DNA_actuator_types.h"
 #include "DNA_controller_types.h"
@@ -2016,8 +2017,8 @@
 					{
 						uiDefButF(block, NUM, 0, "Minimum Gain: ", xco+10, yco-110, wval, 19, &sa->sound3D.min_gain, 0.0, 1.0, 0.0, 0.0, "The minimum gain of the sound, no matter how far it is away.");
 						uiDefButF(block, NUM, 0, "Maximum Gain: ", xco+10, yco-132, wval, 19, &sa->sound3D.max_gain, 0.0, 1.0, 0.0, 0.0, "The maximum gain of the sound, no matter how near it is..");
-						uiDefButF(block, NUM, 0, "Reference Distance: ", xco+10, yco-154, wval, 19, &sa->sound3D.reference_distance, 0.0, 1000.0, 0.0, 0.0, "The reference distance is the distance where the sound has a gain of 1.0.");
-						uiDefButF(block, NUM, 0, "Maximum Distance: ", xco+10, yco-176, wval, 19, &sa->sound3D.max_distance, 0.0, 1000.0, 0.0, 0.0, "The maximum distance at which you can hear the sound.");
+						uiDefButF(block, NUM, 0, "Reference Distance: ", xco+10, yco-154, wval, 19, &sa->sound3D.reference_distance, 0.0, FLT_MAX, 0.0, 0.0, "The reference distance is the distance where the sound has a gain of 1.0.");
+						uiDefButF(block, NUM, 0, "Maximum Distance: ", xco+10, yco-176, wval, 19, &sa->sound3D.max_distance, 0.0, FLT_MAX, 0.0, 0.0, "The maximum distance at which you can hear the sound.");
 						uiDefButF(block, NUM, 0, "Rolloff: ", xco+wval+10, yco-110, wval, 19, &sa->sound3D.rolloff_factor, 0.0, 5.0, 0.0, 0.0, "The rolloff factor defines the influence factor on volume depending on distance.");
 						uiDefButF(block, NUM, 0, "Cone Outer Gain: ", xco+wval+10, yco-132, wval, 19, &sa->sound3D.cone_outer_gain, 0.0, 1.0, 0.0, 0.0, "The gain outside the outer cone. The gain in the outer cone will be interpolated between this value und the normal gain in the inner cone.");
 						uiDefButF(block, NUM, 0, "Cone Outer Angle: ", xco+wval+10, yco-154, wval, 19, &sa->sound3D.cone_outer_angle, 0.0, 360.0, 0.0, 0.0, "The angle of the outer cone.");





More information about the Bf-blender-cvs mailing list