diff options
author | Chris Robinson <[email protected]> | 2017-04-18 00:58:33 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2017-04-18 00:58:33 -0700 |
commit | de62ab97e912525f20272153f6a4c896e833839d (patch) | |
tree | 84dcb690075f7287d02915fe68b3a21ca497d21b /OpenAL32/Include/alu.h | |
parent | 45d52f7124312c91ec0259fbb0c72346ee36e03b (diff) |
Store the source queue head in the voice to signify looping
This removes the need to access a couple more source fields in the mixer, and
also makes the looping and queue fields non-atomic.
Diffstat (limited to 'OpenAL32/Include/alu.h')
-rw-r--r-- | OpenAL32/Include/alu.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/OpenAL32/Include/alu.h b/OpenAL32/Include/alu.h index a2ba4fae..96c7d4c4 100644 --- a/OpenAL32/Include/alu.h +++ b/OpenAL32/Include/alu.h @@ -219,9 +219,6 @@ typedef struct ALvoice { ATOMIC(struct ALsource*) Source; ATOMIC(bool) Playing; - /* Current buffer queue item being played. */ - ATOMIC(struct ALbufferlistitem*) current_buffer; - /** * Source offset in samples, relative to the currently playing buffer, NOT * the whole queue, and the fractional (fixed-point) offset to the next @@ -230,6 +227,14 @@ typedef struct ALvoice { ATOMIC(ALuint) position; ATOMIC(ALsizei) position_fraction; + /* Current buffer queue item being played. */ + ATOMIC(struct 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; + /** * Number of channels and bytes-per-sample for the attached source's * buffer(s). |