Add love.audiodisconnected callback.

The callback is fired when the audio has been disconnected.
This commit is contained in:
Miku AuahDark
2022-05-03 20:39:32 +08:00
parent 5e0f0dc02e
commit 2cc93af436
4 changed files with 44 additions and 5 deletions
+7 -1
View File
@@ -64,7 +64,7 @@ class Pool
{
public:
Pool();
Pool(ALCdevice *device);
~Pool();
/**
@@ -101,9 +101,15 @@ private:
// Maximum possible number of OpenAL sources the pool attempts to generate.
static const int MAX_SOURCES = 64;
// Current OpenAL device
ALCdevice *device;
// OpenAL sources
ALuint sources[MAX_SOURCES];
// Is device disconnection has been notified?
bool disconnectNotified;
// Total number of created sources in the pool.
int totalSources;