aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends/jack.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-11-26 14:31:54 -0800
committerChris Robinson <[email protected]>2018-11-26 14:31:54 -0800
commita6923790fac739f0b98db6c06bc93543b9707556 (patch)
treee30677dd529ba0a2fecb6cbd6232f862acdc27dd /Alc/backends/jack.cpp
parent5b2b96b24598636e35f1fe7ecf868b09571065d6 (diff)
Avoid using ATOMIC_INIT
Diffstat (limited to 'Alc/backends/jack.cpp')
-rw-r--r--Alc/backends/jack.cpp15
1 files changed, 4 insertions, 11 deletions
diff --git a/Alc/backends/jack.cpp b/Alc/backends/jack.cpp
index cd02388d..d0687939 100644
--- a/Alc/backends/jack.cpp
+++ b/Alc/backends/jack.cpp
@@ -145,13 +145,13 @@ static ALCboolean jack_load(void)
struct ALCjackPlayback final : public ALCbackend {
- jack_client_t *Client;
- jack_port_t *Port[MAX_OUTPUT_CHANNELS];
+ jack_client_t *Client{nullptr};
+ jack_port_t *Port[MAX_OUTPUT_CHANNELS]{};
- ll_ringbuffer_t *Ring;
+ ll_ringbuffer_t *Ring{nullptr};
alsem_t Sem;
- ATOMIC(ALenum) killNow;
+ ATOMIC(ALenum) killNow{AL_TRUE};
althrd_t thread;
};
@@ -183,13 +183,6 @@ static void ALCjackPlayback_Construct(ALCjackPlayback *self, ALCdevice *device)
SET_VTABLE2(ALCjackPlayback, ALCbackend, self);
alsem_init(&self->Sem, 0);
-
- self->Client = NULL;
- for(ALsizei i{0};i < MAX_OUTPUT_CHANNELS;i++)
- self->Port[i] = NULL;
- self->Ring = NULL;
-
- ATOMIC_INIT(&self->killNow, AL_TRUE);
}
static void ALCjackPlayback_Destruct(ALCjackPlayback *self)