aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends/oss.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-12-27 13:40:43 -0800
committerChris Robinson <[email protected]>2018-12-27 13:40:43 -0800
commit4782d6107d250e3528c5e567dca48da727584ee7 (patch)
tree05679c4196c4dacfce65991fa4caa7862cf1c381 /Alc/backends/oss.cpp
parent7880f27054cd69cd1e36ebd3d20aa9d6148e3bbd (diff)
Use a proper constructor/destructor for the ALCbackend base
Diffstat (limited to 'Alc/backends/oss.cpp')
-rw-r--r--Alc/backends/oss.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/Alc/backends/oss.cpp b/Alc/backends/oss.cpp
index ec9028eb..73b62b30 100644
--- a/Alc/backends/oss.cpp
+++ b/Alc/backends/oss.cpp
@@ -248,6 +248,8 @@ struct ALCplaybackOSS final : public ALCbackend {
std::atomic<ALenum> mKillNow{AL_TRUE};
std::thread mThread;
+
+ ALCplaybackOSS(ALCdevice *device) noexcept : ALCbackend{device} { }
};
int ALCplaybackOSS_mixerProc(ALCplaybackOSS *self);
@@ -269,8 +271,7 @@ DEFINE_ALCBACKEND_VTABLE(ALCplaybackOSS);
void ALCplaybackOSS_Construct(ALCplaybackOSS *self, ALCdevice *device)
{
- new (self) ALCplaybackOSS{};
- ALCbackend_Construct(STATIC_CAST(ALCbackend, self), device);
+ new (self) ALCplaybackOSS{device};
SET_VTABLE2(ALCplaybackOSS, ALCbackend, self);
}
@@ -280,7 +281,6 @@ void ALCplaybackOSS_Destruct(ALCplaybackOSS *self)
close(self->fd);
self->fd = -1;
- ALCbackend_Destruct(STATIC_CAST(ALCbackend, self));
self->~ALCplaybackOSS();
}
@@ -498,6 +498,8 @@ struct ALCcaptureOSS final : public ALCbackend {
std::atomic<ALenum> mKillNow{AL_TRUE};
std::thread mThread;
+
+ ALCcaptureOSS(ALCdevice *device) noexcept : ALCbackend{device} { }
};
int ALCcaptureOSS_recordProc(ALCcaptureOSS *self);
@@ -519,8 +521,7 @@ DEFINE_ALCBACKEND_VTABLE(ALCcaptureOSS);
void ALCcaptureOSS_Construct(ALCcaptureOSS *self, ALCdevice *device)
{
- new (self) ALCcaptureOSS{};
- ALCbackend_Construct(STATIC_CAST(ALCbackend, self), device);
+ new (self) ALCcaptureOSS{device};
SET_VTABLE2(ALCcaptureOSS, ALCbackend, self);
}
@@ -530,7 +531,6 @@ void ALCcaptureOSS_Destruct(ALCcaptureOSS *self)
close(self->fd);
self->fd = -1;
- ALCbackend_Destruct(STATIC_CAST(ALCbackend, self));
self->~ALCcaptureOSS();
}