diff options
author | Chris Robinson <[email protected]> | 2018-01-29 01:00:53 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-01-29 01:00:53 -0800 |
commit | e7217760f39071c7aec542c8f3fbaad21c71924a (patch) | |
tree | 903f585eaa34750b2f7c4a65619c1cf4475bb8a0 /Alc/backends/sndio.c | |
parent | a042dbf30524429b49adb63efda35f53054ae924 (diff) |
Don't bother with an explicit stop backend method
Diffstat (limited to 'Alc/backends/sndio.c')
-rw-r--r-- | Alc/backends/sndio.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/Alc/backends/sndio.c b/Alc/backends/sndio.c index 436baf26..f7b9af69 100644 --- a/Alc/backends/sndio.c +++ b/Alc/backends/sndio.c @@ -52,7 +52,6 @@ static int ALCsndioBackend_mixerProc(void *ptr); static void ALCsndioBackend_Construct(ALCsndioBackend *self, ALCdevice *device); static void ALCsndioBackend_Destruct(ALCsndioBackend *self); static ALCenum ALCsndioBackend_open(ALCsndioBackend *self, const ALCchar *name); -static void ALCsndioBackend_close(ALCsndioBackend *self); static ALCboolean ALCsndioBackend_reset(ALCsndioBackend *self); static ALCboolean ALCsndioBackend_start(ALCsndioBackend *self); static void ALCsndioBackend_stop(ALCsndioBackend *self); @@ -73,11 +72,16 @@ static void ALCsndioBackend_Construct(ALCsndioBackend *self, ALCdevice *device) { ALCbackend_Construct(STATIC_CAST(ALCbackend, self), device); SET_VTABLE2(ALCsndioBackend, ALCbackend, self); + + self->sndHandle = NULL; + self->mix_data = NULL; } static void ALCsndioBackend_Destruct(ALCsndioBackend *self) { - ALCsndioBackend_close(self); + if(self->sndHandle) + sio_close(self->sndHandle); + self->sndHandle = NULL; al_free(self->mix_data); self->mix_data = NULL; @@ -148,13 +152,6 @@ static ALCenum ALCsndioBackend_open(ALCsndioBackend *self, const ALCchar *name) return ALC_NO_ERROR; } -static void ALCsndioBackend_close(ALCsndioBackend *self) -{ - if(self->sndHandle) - sio_close(self->sndHandle); - self->sndHandle = NULL; -} - static ALCboolean ALCsndioBackend_reset(ALCsndioBackend *self) { ALCdevice *device = STATIC_CAST(ALCbackend,self)->mDevice; |