comparison ALmixer.c @ 26:884cce2515eb

Put LowerThreadPriority in ENABLE_ALMIXER_THREADS_BLOCK
author Eric Wing <ewing . public |-at-| gmail . com>
date Fri, 24 Dec 2010 13:58:04 -0800
parents 46e82b415520
children 9cf93a099f75
comparison
equal deleted inserted replaced
25:46e82b415520 26:884cce2515eb
223 /* This is for a simple lock system. It is not meant to be good, 223 /* This is for a simple lock system. It is not meant to be good,
224 * but just sufficient to minimize/avoid threading issues 224 * but just sufficient to minimize/avoid threading issues
225 */ 225 */
226 static SDL_mutex* s_simpleLock; 226 static SDL_mutex* s_simpleLock;
227 static SDL_Thread* Stream_Thread_global = NULL; 227 static SDL_Thread* Stream_Thread_global = NULL;
228 #endif 228 #endif /* ENABLE_ALMIXER_THREADS */
229 229
230 static LinkedList* s_listOfALmixerData = NULL; 230 static LinkedList* s_listOfALmixerData = NULL;
231 231
232 /* Special stuff for iOS interruption handling */ 232 /* Special stuff for iOS interruption handling */
233 static ALCcontext* s_interruptionContext = NULL; 233 static ALCcontext* s_interruptionContext = NULL;
349 * 0 (PTHREAD_MIN_PRIORITY) seems to be the best value so far. 349 * 0 (PTHREAD_MIN_PRIORITY) seems to be the best value so far.
350 * Mac also reports 31 as the default. However, I have not noticed the same 350 * Mac also reports 31 as the default. However, I have not noticed the same
351 * performance problems and cannot get audio to show up as a significant percentage 351 * performance problems and cannot get audio to show up as a significant percentage
352 * of the CPU time in Shark/Instruments. 352 * of the CPU time in Shark/Instruments.
353 */ 353 */
354 #ifdef ENABLE_ALMIXER_THREADS
354 #if defined(__APPLE__) && !defined(ALMIXER_COMPILE_WITHOUT_SDL) && ( (TARGET_OS_IPHONE == 1) || (TARGET_IPHONE_SIMULATOR == 1) ) 355 #if defined(__APPLE__) && !defined(ALMIXER_COMPILE_WITHOUT_SDL) && ( (TARGET_OS_IPHONE == 1) || (TARGET_IPHONE_SIMULATOR == 1) )
355 #include <pthread.h> 356 #include <pthread.h>
356 #endif 357 #endif
357 static void Internal_LowerThreadPriority(SDL_Thread* simple_thread) 358 static void Internal_LowerThreadPriority(SDL_Thread* simple_thread)
358 { 359 {
371 #endif 372 #endif
372 #else 373 #else
373 /* No-Op */ 374 /* No-Op */
374 #endif 375 #endif
375 } 376 }
377 #endif /* ENABLE_ALMIXER_THREADS */
376 378
377 /* If ENABLE_PARANOID_SIGNEDNESS_CHECK is used, 379 /* If ENABLE_PARANOID_SIGNEDNESS_CHECK is used,
378 * these values will be reset on Init() 380 * these values will be reset on Init()
379 * Consider these values Read-Only. 381 * Consider these values Read-Only.
380 */ 382 */