diff options
Diffstat (limited to 'router/alc.c')
-rw-r--r-- | router/alc.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/router/alc.c b/router/alc.c index 704aa146..87f1e3f7 100644 --- a/router/alc.c +++ b/router/alc.c @@ -240,8 +240,8 @@ static const ALCint alcMinorVersion = 1; static ATOMIC(ALCenum) LastError = ATOMIC_INIT_STATIC(ALC_NO_ERROR); -PtrIntMap DeviceIfaceMap = PTRINTMAP_STATIC_INITIALIZE; -PtrIntMap ContextIfaceMap = PTRINTMAP_STATIC_INITIALIZE; +static PtrIntMap DeviceIfaceMap = PTRINTMAP_STATIC_INITIALIZE; +static PtrIntMap ContextIfaceMap = PTRINTMAP_STATIC_INITIALIZE; typedef struct EnumeratedList { @@ -317,6 +317,16 @@ static ALint GetDriverIndexForName(const EnumeratedList *list, const ALCchar *na return -1; } +void ReleaseALC(void) +{ + ClearDeviceList(&DevicesList); + ClearDeviceList(&AllDevicesList); + ClearDeviceList(&CaptureDevicesList); + + ResetPtrIntMap(&ContextIfaceMap); + ResetPtrIntMap(&DeviceIfaceMap); +} + ALC_API ALCdevice* ALC_APIENTRY alcOpenDevice(const ALCchar *devicename) { |