aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends/base.h
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-11-15 03:49:59 -0800
committerChris Robinson <[email protected]>2018-11-15 03:49:59 -0800
commitd4f64b9e29319f56f2ecab1291918a52ec8336f1 (patch)
tree63e9dade7a1a08b2422ae3c37ee008188e20a677 /Alc/backends/base.h
parentb7daddb564cfa551c9dcc983bdc0e6bc53cc67d3 (diff)
Use a C++ mutex with the device backend base
Diffstat (limited to 'Alc/backends/base.h')
-rw-r--r--Alc/backends/base.h14
1 files changed, 5 insertions, 9 deletions
diff --git a/Alc/backends/base.h b/Alc/backends/base.h
index 75950344..f8b5f346 100644
--- a/Alc/backends/base.h
+++ b/Alc/backends/base.h
@@ -2,18 +2,16 @@
#define AL_BACKENDS_BASE_H
#include "alMain.h"
-#include "threads.h"
#include "alstring.h"
-
#ifdef __cplusplus
-extern "C" {
-#endif
-typedef struct ClockLatency {
+#include <mutex>
+
+struct ClockLatency {
ALint64 ClockTime;
ALint64 Latency;
-} ClockLatency;
+};
/* Helper to get the current clock time from the device's ClockBase, and
* SamplesDone converted from the sample rate.
@@ -29,8 +27,6 @@ void ALCdevice_Unlock(ALCdevice *device);
ClockLatency GetClockLatency(ALCdevice *device);
-#ifdef __cplusplus
-} /* extern "C" */
struct ALCbackendVtable;
@@ -39,7 +35,7 @@ struct ALCbackend {
ALCdevice *mDevice;
- almtx_t mMutex;
+ std::recursive_mutex mMutex;
};
void ALCbackend_Construct(ALCbackend *self, ALCdevice *device);