comparison ALmixer.c @ 79:358b0bd5df43 tip

Added support for Apportable's alcSuspend()/alcResume() in BeginInterruption()/EndInterruption. You must define ALMIXER_USE_APPORTABLE_OPENAL_EXTENSIONS to compile in this support.
author Eric Wing <ewing@coronalabs.com>
date Tue, 30 Oct 2012 16:01:30 -0700
parents 40078d025b73
children
comparison
equal deleted inserted replaced
78:714ec6c5789d 79:358b0bd5df43
7545 return; 7545 return;
7546 } 7546 }
7547 7547
7548 ALmixer_SuspendUpdates(); 7548 ALmixer_SuspendUpdates();
7549 7549
7550 /* App Portable introduced alcSuspend() and alcResume() for Android in their OpenAL Soft fork. */
7551 #if defined(__ANDROID__) && defined(ALMIXER_USE_APPORTABLE_OPENAL_EXTENSIONS)
7552 alcSuspend();
7553 #endif
7554
7555
7550 s_interruptionContext = alcGetCurrentContext(); 7556 s_interruptionContext = alcGetCurrentContext();
7551 if(NULL != s_interruptionContext) 7557 if(NULL != s_interruptionContext)
7552 { 7558 {
7553 /* iOS alcSuspendContext is a no-op */ 7559 /* iOS alcSuspendContext is a no-op */
7554 alcSuspendContext(s_interruptionContext); 7560 alcSuspendContext(s_interruptionContext);
7584 { 7590 {
7585 alcMakeContextCurrent(s_interruptionContext); 7591 alcMakeContextCurrent(s_interruptionContext);
7586 alcProcessContext(s_interruptionContext); 7592 alcProcessContext(s_interruptionContext);
7587 s_interruptionContext = NULL; 7593 s_interruptionContext = NULL;
7588 } 7594 }
7595
7596
7597 /* App Portable introduced alcSuspend() and alcResume() for Android in their OpenAL Soft fork. */
7598 #if defined(__ANDROID__) && defined(ALMIXER_USE_APPORTABLE_OPENAL_EXTENSIONS)
7599 alcResume();
7600 #endif
7601
7589 7602
7590 ALmixer_ResumeUpdates(); 7603 ALmixer_ResumeUpdates();
7591 g_inInterruption = AL_FALSE; 7604 g_inInterruption = AL_FALSE;
7592 } 7605 }
7593 7606