File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -175,19 +175,15 @@ - (id) init
175175
176176 operationQueue = [[NSOperationQueue alloc ] init ];
177177
178- #if __CC_PLATFORM_IOS || __CC_PLATFORM_MAC
179178 [[OALAudioSession sharedInstance ] addSuspendListener: self ];
180- #endif
181179 }
182180 return self;
183181}
184182
185183- (void ) dealloc
186184{
187185 OAL_LOG_DEBUG (@" %@ : Dealloc" , self);
188- #if __CC_PLATFORM_IOS || __CC_PLATFORM_MAC
189186 [[OALAudioSession sharedInstance ] removeSuspendListener: self ];
190- #endif
191187
192188 as_release (operationQueue);
193189 as_release (suspendHandler);
@@ -330,12 +326,18 @@ - (void) setSuspended:(bool) value
330326{
331327 if (value)
332328 {
329+ #if __CC_PLATFORM_ANDROID
330+ alcSuspend ();
331+ #endif
333332 [ALWrapper makeContextCurrent: nil ];
334333 }
335334 else
336335 {
337336 [ALWrapper makeContextCurrent: self .realCurrentContext.context
338337 deviceReference: self .realCurrentContext.device.device];
338+ #if __CC_PLATFORM_ANDROID
339+ alcResume ();
340+ #endif
339341 }
340342}
341343
You can’t perform that action at this time.
0 commit comments