aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-11-26 14:48:26 -0800
committerChris Robinson <[email protected]>2018-11-26 14:48:26 -0800
commit053599b2435844eddcc084414ab9dd1c5ad7ec23 (patch)
treedd041ee64b6d056708ad500f5e6d5b0d144cecc7 /OpenAL32
parenta6923790fac739f0b98db6c06bc93543b9707556 (diff)
Avoid using the ATOMIC() macro
Diffstat (limited to 'OpenAL32')
-rw-r--r--OpenAL32/Include/alAuxEffectSlot.h4
-rw-r--r--OpenAL32/Include/alListener.h4
-rw-r--r--OpenAL32/Include/alMain.h8
-rw-r--r--OpenAL32/Include/alSource.h2
-rw-r--r--OpenAL32/Include/alu.h18
5 files changed, 18 insertions, 18 deletions
diff --git a/OpenAL32/Include/alAuxEffectSlot.h b/OpenAL32/Include/alAuxEffectSlot.h
index dfb57140..586fc507 100644
--- a/OpenAL32/Include/alAuxEffectSlot.h
+++ b/OpenAL32/Include/alAuxEffectSlot.h
@@ -54,7 +54,7 @@ struct ALeffectslotProps {
EffectState *State;
- ATOMIC(struct ALeffectslotProps*) next;
+ std::atomic<ALeffectslotProps*> next;
};
@@ -73,7 +73,7 @@ struct ALeffectslot {
RefCount ref{0u};
- ATOMIC(struct ALeffectslotProps*) Update{nullptr};
+ std::atomic<ALeffectslotProps*> Update{nullptr};
struct {
ALfloat Gain{1.0f};
diff --git a/OpenAL32/Include/alListener.h b/OpenAL32/Include/alListener.h
index 6b1dcda9..f3a39dfa 100644
--- a/OpenAL32/Include/alListener.h
+++ b/OpenAL32/Include/alListener.h
@@ -18,7 +18,7 @@ struct ALlistenerProps {
ALfloat Up[3];
ALfloat Gain;
- ATOMIC(ALlistenerProps*) next;
+ std::atomic<ALlistenerProps*> next;
};
struct ALlistener {
@@ -32,7 +32,7 @@ struct ALlistener {
/* Pointer to the most recent property values that are awaiting an update.
*/
- ATOMIC(ALlistenerProps*) Update{nullptr};
+ std::atomic<ALlistenerProps*> Update{nullptr};
struct {
aluMatrixf Matrix;
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h
index c08f9a09..297ff06f 100644
--- a/OpenAL32/Include/alMain.h
+++ b/OpenAL32/Include/alMain.h
@@ -667,7 +667,7 @@ typedef void (*POSTPROCESS)(ALCdevice *device, ALsizei SamplesToDo);
struct ALCdevice_struct {
RefCount ref{1u};
- ATOMIC(ALenum) Connected{AL_TRUE};
+ std::atomic<ALenum> Connected{AL_TRUE};
DeviceType Type{};
ALuint Frequency{};
@@ -687,7 +687,7 @@ struct ALCdevice_struct {
std::string DeviceName;
- ATOMIC(ALCenum) LastError{ALC_NO_ERROR};
+ std::atomic<ALCenum> LastError{ALC_NO_ERROR};
// Maximum number of sources that can be created
ALuint SourcesMax{};
@@ -783,12 +783,12 @@ struct ALCdevice_struct {
RefCount MixCount{0u};
// Contexts created on this device
- ATOMIC(ALCcontext*) ContextList{nullptr};
+ std::atomic<ALCcontext*> ContextList{nullptr};
almtx_t BackendLock;
ALCbackend *Backend{nullptr};
- ATOMIC(ALCdevice*) next{nullptr};
+ std::atomic<ALCdevice*> next{nullptr};
ALCdevice_struct(DeviceType type);
diff --git a/OpenAL32/Include/alSource.h b/OpenAL32/Include/alSource.h
index 05ccdadf..2cbc5ddc 100644
--- a/OpenAL32/Include/alSource.h
+++ b/OpenAL32/Include/alSource.h
@@ -19,7 +19,7 @@ struct ALsource;
typedef struct ALbufferlistitem {
- ATOMIC(struct ALbufferlistitem*) next;
+ std::atomic<ALbufferlistitem*> next;
ALsizei max_samples;
ALsizei num_buffers;
struct ALbuffer *buffers[];
diff --git a/OpenAL32/Include/alu.h b/OpenAL32/Include/alu.h
index eb71290a..d51000c8 100644
--- a/OpenAL32/Include/alu.h
+++ b/OpenAL32/Include/alu.h
@@ -144,7 +144,7 @@ typedef struct SendParams {
struct ALvoiceProps {
- ATOMIC(struct ALvoiceProps*) next;
+ std::atomic<ALvoiceProps*> next;
ALfloat Pitch;
ALfloat Gain;
@@ -203,28 +203,28 @@ struct ALvoiceProps {
#define VOICE_HAS_NFC (1<<3)
typedef struct ALvoice {
- struct ALvoiceProps *Props;
+ ALvoiceProps *Props;
- ATOMIC(struct ALvoiceProps*) Update;
+ std::atomic<ALvoiceProps*> Update;
- ATOMIC(struct ALsource*) Source;
- ATOMIC(bool) Playing;
+ std::atomic<ALsource*> Source;
+ std::atomic<bool> Playing;
/**
* Source offset in samples, relative to the currently playing buffer, NOT
* the whole queue, and the fractional (fixed-point) offset to the next
* sample.
*/
- ATOMIC(ALuint) position;
- ATOMIC(ALsizei) position_fraction;
+ std::atomic<ALuint> position;
+ std::atomic<ALsizei> position_fraction;
/* Current buffer queue item being played. */
- ATOMIC(struct ALbufferlistitem*) current_buffer;
+ std::atomic<ALbufferlistitem*> current_buffer;
/* Buffer queue item to loop to at end of queue (will be NULL for non-
* looping voices).
*/
- ATOMIC(struct ALbufferlistitem*) loop_buffer;
+ std::atomic<ALbufferlistitem*> loop_buffer;
/**
* Number of channels and bytes-per-sample for the attached source's