openalbridge/openalwrap.c
changeset 2260 31756e21c436
parent 2259 ca42efdce3ce
child 2261 57e99c908e7c
--- a/openalbridge/openalwrap.c	Sun Jul 12 15:42:54 2009 +0000
+++ b/openalbridge/openalwrap.c	Sun Jul 12 19:12:08 2009 +0000
@@ -125,11 +125,13 @@
     
     ALboolean helper_realloc (void) {
         /*expands allocated memory when loading more sound files than expected*/
-#ifdef DEBUG
-        fprintf(stderr, "OpenAL: Realloc in process %d\n", globalsize);
-#endif
+        int oldsize = globalsize;
         globalsize += increment;
 
+#ifdef DEBUG
+        fprintf(stderr, "OpenAL: Realloc in process from %d to %d\n", oldsize, globalsize);
+#endif
+        
         Buffers = (ALuint*) Realloc(Buffers, sizeof(ALuint)*globalsize);
         Sources = (ALuint*) Realloc(Sources, sizeof(ALuint)*globalsize);
         
@@ -338,14 +340,14 @@
 #ifndef _WIN32
             pthread_create(&thread, NULL, helper_fadein, (void*) fade);
 #else
-            Thread = _beginthread(&helper_fadein, 0, (void*) fade);
+        Thread = _beginthread(&helper_fadein, 0, (void*) fade);
 #endif
         else {
             if (direction == FADE_OUT)
 #ifndef _WIN32
                 pthread_create(&thread, NULL, helper_fadeout, (void*) fade);
 #else
-                Thread = _beginthread(&helper_fadeout, 0, (void*) fade);
+            Thread = _beginthread(&helper_fadeout, 0, (void*) fade);
 #endif	
             else {
                 fprintf(stderr, "ERROR: unknown direction for fade (%d)\n", direction);