From 30007263e5ffe1883d634081dcbfcc65dbf58cc4 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Fri, 15 Dec 2017 22:59:51 -0800 Subject: Allow storing multiple buffers in a ALbufferlistitem This will be to allow buffer layering, multiple buffers of the same format and sample rate that are mixed together prior to resampling, filtering, and panning. This will allow composing sounds from individual components that can be swapped around on different invocations (e.g. layer SoundA and SoundB on one instance and SoundA and SoundC on a different instance for a slightly different sound, then just SoundA for a third instance, and so on). The longest buffer within the list item determines the length of the list item. More work needs to be done to fully support it, namely the ability to specity multiple buffers to layer for static and streaming sources. Also the behavior of loop points for layered static sources should be worked out. Should also consider allowing each layer to have a sample offset. --- OpenAL32/Include/alSource.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'OpenAL32/Include') diff --git a/OpenAL32/Include/alSource.h b/OpenAL32/Include/alSource.h index 03034ce8..970ea07c 100644 --- a/OpenAL32/Include/alSource.h +++ b/OpenAL32/Include/alSource.h @@ -19,8 +19,9 @@ struct ALsource; typedef struct ALbufferlistitem { - struct ALbuffer *buffer; ATOMIC(struct ALbufferlistitem*) next; + ALsizei num_buffers; + struct ALbuffer *buffers[]; } ALbufferlistitem; -- cgit v1.2.3