Revision: 16488
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16488
Author:   campbellbarton
Date:     2008-09-12 15:24:22 +0200 (Fri, 12 Sep 2008)

Log Message:
-----------
made max sounds playable at once 32 rather then 16. (demo release background 
music would turn off otherwise)
made selecting sound samples keep the relative path setting.

Modified Paths:
--------------
    trunk/blender/intern/SoundSystem/SoundDefines.h
    trunk/blender/source/blender/src/buttons_scene.c

Modified: trunk/blender/intern/SoundSystem/SoundDefines.h
===================================================================
--- trunk/blender/intern/SoundSystem/SoundDefines.h     2008-09-12 13:15:52 UTC 
(rev 16487)
+++ trunk/blender/intern/SoundSystem/SoundDefines.h     2008-09-12 13:24:22 UTC 
(rev 16488)
@@ -44,7 +44,7 @@
 
 /* general stuff */
 #define NUM_BUFFERS                                            128
-#define NUM_SOURCES                                            16
+#define NUM_SOURCES                                            32
 
 /* openal related stuff */
 #define AL_LOOPING                                             0x1007

Modified: trunk/blender/source/blender/src/buttons_scene.c
===================================================================
--- trunk/blender/source/blender/src/buttons_scene.c    2008-09-12 13:15:52 UTC 
(rev 16487)
+++ trunk/blender/source/blender/src/buttons_scene.c    2008-09-12 13:24:22 UTC 
(rev 16488)
@@ -211,9 +211,15 @@
        case B_SOUND_MENU_SAMPLE:
                if (G.buts->menunr > 0) {
                        sample = BLI_findlink(samples, G.buts->menunr - 1);
-                       if (sample && sound) {
+                       if (sample && sound && sound->sample != sample) {
+                               int wasrelative = (strncmp(sound->name, "//", 
2)==0);
+                               
                                BLI_strncpy(sound->name, sample->name, 
sizeof(sound->name));
                                sound_set_sample(sound, sample);
+                               
+                               if (wasrelative)
+                                       BLI_makestringcode(G.sce, sound->name);
+                                       
                                do_soundbuts(B_SOUND_REDRAW);
                        }
                }


_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to