equal
deleted
inserted
replaced
123 } |
123 } |
124 |
124 |
125 |
125 |
126 ALboolean helper_realloc (void) { |
126 ALboolean helper_realloc (void) { |
127 /*expands allocated memory when loading more sound files than expected*/ |
127 /*expands allocated memory when loading more sound files than expected*/ |
128 #ifdef DEBUG |
128 int oldsize = globalsize; |
129 fprintf(stderr, "OpenAL: Realloc in process %d\n", globalsize); |
|
130 #endif |
|
131 globalsize += increment; |
129 globalsize += increment; |
132 |
130 |
|
131 #ifdef DEBUG |
|
132 fprintf(stderr, "OpenAL: Realloc in process from %d to %d\n", oldsize, globalsize); |
|
133 #endif |
|
134 |
133 Buffers = (ALuint*) Realloc(Buffers, sizeof(ALuint)*globalsize); |
135 Buffers = (ALuint*) Realloc(Buffers, sizeof(ALuint)*globalsize); |
134 Sources = (ALuint*) Realloc(Sources, sizeof(ALuint)*globalsize); |
136 Sources = (ALuint*) Realloc(Sources, sizeof(ALuint)*globalsize); |
135 |
137 |
136 return AL_TRUE; |
138 return AL_TRUE; |
137 } |
139 } |
336 |
338 |
337 if (direction == FADE_IN) |
339 if (direction == FADE_IN) |
338 #ifndef _WIN32 |
340 #ifndef _WIN32 |
339 pthread_create(&thread, NULL, helper_fadein, (void*) fade); |
341 pthread_create(&thread, NULL, helper_fadein, (void*) fade); |
340 #else |
342 #else |
341 Thread = _beginthread(&helper_fadein, 0, (void*) fade); |
343 Thread = _beginthread(&helper_fadein, 0, (void*) fade); |
342 #endif |
344 #endif |
343 else { |
345 else { |
344 if (direction == FADE_OUT) |
346 if (direction == FADE_OUT) |
345 #ifndef _WIN32 |
347 #ifndef _WIN32 |
346 pthread_create(&thread, NULL, helper_fadeout, (void*) fade); |
348 pthread_create(&thread, NULL, helper_fadeout, (void*) fade); |
347 #else |
349 #else |
348 Thread = _beginthread(&helper_fadeout, 0, (void*) fade); |
350 Thread = _beginthread(&helper_fadeout, 0, (void*) fade); |
349 #endif |
351 #endif |
350 else { |
352 else { |
351 fprintf(stderr, "ERROR: unknown direction for fade (%d)\n", direction); |
353 fprintf(stderr, "ERROR: unknown direction for fade (%d)\n", direction); |
352 free(fade); |
354 free(fade); |
353 return AL_FALSE; |
355 return AL_FALSE; |