From ef63ec3fe9364d2036878fa871f49ee60f84482b Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 9 Jan 2018 23:55:59 -0800 Subject: Use one macro to handle both resample padding sizes --- OpenAL32/Include/alu.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'OpenAL32/Include/alu.h') diff --git a/OpenAL32/Include/alu.h b/OpenAL32/Include/alu.h index 3fc677b2..fe1b19e9 100644 --- a/OpenAL32/Include/alu.h +++ b/OpenAL32/Include/alu.h @@ -23,11 +23,10 @@ #define MAX_PITCH (255) -/* Maximum number of buffer samples before the current pos needed for resampling. */ -#define MAX_PRE_SAMPLES 24 - -/* Maximum number of buffer samples after the current pos needed for resampling. */ -#define MAX_POST_SAMPLES 24 +/* Maximum number of samples to pad on either end of a buffer for resampling. + * Note that both the beginning and end need padding! + */ +#define MAX_RESAMPLE_PADDING 24 #ifdef __cplusplus @@ -282,7 +281,7 @@ typedef struct ALvoice { ALuint Offset; /* Number of output samples mixed since starting. */ - alignas(16) ALfloat PrevSamples[MAX_INPUT_CHANNELS][MAX_PRE_SAMPLES]; + alignas(16) ALfloat PrevSamples[MAX_INPUT_CHANNELS][MAX_RESAMPLE_PADDING]; InterpState ResampleState; -- cgit v1.2.3