made max sounds playable at once 32 rather then 16. (demo release background music...
authorCampbell Barton <ideasman42@gmail.com>
Fri, 12 Sep 2008 13:24:22 +0000 (13:24 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 12 Sep 2008 13:24:22 +0000 (13:24 +0000)
made selecting sound samples keep the relative path setting.

intern/SoundSystem/SoundDefines.h
source/blender/src/buttons_scene.c

index 5d425a8dc948a236317ce7963ad9432bdf4754a5..9758fdaadea1cb81a90fa495713ecab4dcd8edb8 100644 (file)
@@ -44,7 +44,7 @@ enum
 
 /* general stuff */
 #define NUM_BUFFERS                                            128
-#define NUM_SOURCES                                            16
+#define NUM_SOURCES                                            32
 
 /* openal related stuff */
 #define AL_LOOPING                                             0x1007
index 5205be3e1b0dba4e79924dc3682806201c39da88..f2e20356f210ba7e2e8c1f683bf131b03c16d9b4 100644 (file)
@@ -211,9 +211,15 @@ void do_soundbuts(unsigned short event)
        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);
                        }
                }