diff options
author | Chris Robinson <[email protected]> | 2018-01-28 23:32:28 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-01-28 23:32:28 -0800 |
commit | a042dbf30524429b49adb63efda35f53054ae924 (patch) | |
tree | 6e905d8173f2db6dd41b2e9cb471a9c860c54279 /Alc/backends/wave.c | |
parent | 328fd7329d1ae1554452d2d4b0384173c0f47079 (diff) |
Call the backend close method in the destructor
Diffstat (limited to 'Alc/backends/wave.c')
-rw-r--r-- | Alc/backends/wave.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Alc/backends/wave.c b/Alc/backends/wave.c index 1c502fd9..538ab5e6 100644 --- a/Alc/backends/wave.c +++ b/Alc/backends/wave.c @@ -84,7 +84,7 @@ typedef struct ALCwaveBackend { static int ALCwaveBackend_mixerProc(void *ptr); static void ALCwaveBackend_Construct(ALCwaveBackend *self, ALCdevice *device); -static DECLARE_FORWARD(ALCwaveBackend, ALCbackend, void, Destruct) +static void ALCwaveBackend_Destruct(ALCwaveBackend *self); static ALCenum ALCwaveBackend_open(ALCwaveBackend *self, const ALCchar *name); static void ALCwaveBackend_close(ALCwaveBackend *self); static ALCboolean ALCwaveBackend_reset(ALCwaveBackend *self); @@ -114,6 +114,11 @@ static void ALCwaveBackend_Construct(ALCwaveBackend *self, ALCdevice *device) self->killNow = 1; } +static void ALCwaveBackend_Destruct(ALCwaveBackend *self) +{ + ALCwaveBackend_close(self); + ALCbackend_Destruct(STATIC_CAST(ALCbackend, self)); +} static int ALCwaveBackend_mixerProc(void *ptr) { |