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
175
175
176
176
operationQueue = [[NSOperationQueue alloc ] init ];
177
177
178
- #if __CC_PLATFORM_IOS || __CC_PLATFORM_MAC
179
178
[[OALAudioSession sharedInstance ] addSuspendListener: self ];
180
- #endif
181
179
}
182
180
return self;
183
181
}
184
182
185
183
- (void ) dealloc
186
184
{
187
185
OAL_LOG_DEBUG (@" %@ : Dealloc" , self);
188
- #if __CC_PLATFORM_IOS || __CC_PLATFORM_MAC
189
186
[[OALAudioSession sharedInstance ] removeSuspendListener: self ];
190
- #endif
191
187
192
188
as_release (operationQueue);
193
189
as_release (suspendHandler);
@@ -330,12 +326,18 @@ - (void) setSuspended:(bool) value
330
326
{
331
327
if (value)
332
328
{
329
+ #if __CC_PLATFORM_ANDROID
330
+ alcSuspend ();
331
+ #endif
333
332
[ALWrapper makeContextCurrent: nil ];
334
333
}
335
334
else
336
335
{
337
336
[ALWrapper makeContextCurrent: self .realCurrentContext.context
338
337
deviceReference: self .realCurrentContext.device.device];
338
+ #if __CC_PLATFORM_ANDROID
339
+ alcResume ();
340
+ #endif
339
341
}
340
342
}
341
343
You can’t perform that action at this time.
0 commit comments