mirror of
https://github.com/love2d/love.git
synced 2026-08-16 16:20:42 +02:00
Pause OpenAL when the app is in the background, on Android.
This commit is contained in:
@@ -190,6 +190,9 @@ void Audio::pause(love::audio::Source *source)
|
||||
void Audio::pause()
|
||||
{
|
||||
pool->pause();
|
||||
#ifdef LOVE_ANDROID
|
||||
alcDevicePauseSOFT(device);
|
||||
#endif
|
||||
}
|
||||
|
||||
void Audio::resume(love::audio::Source *source)
|
||||
@@ -199,6 +202,9 @@ void Audio::resume(love::audio::Source *source)
|
||||
|
||||
void Audio::resume()
|
||||
{
|
||||
#ifdef LOVE_ANDROID
|
||||
alcDeviceResumeSOFT(device);
|
||||
#endif
|
||||
pool->resume();
|
||||
}
|
||||
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
#else
|
||||
#include <AL/alc.h>
|
||||
#include <AL/al.h>
|
||||
#include <AL/alext.h>
|
||||
#endif
|
||||
|
||||
namespace love
|
||||
|
||||
Reference in New Issue
Block a user