From 3ba4746ff852c3ac6dcfb047fa51b75c1d58e5c4 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Fri, 26 Jan 2018 16:41:14 -0800 Subject: Allow preserving converted samples --- OpenAL32/alBuffer.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/OpenAL32/alBuffer.c b/OpenAL32/alBuffer.c index 69dc9bc2..f692ca11 100644 --- a/OpenAL32/alBuffer.c +++ b/OpenAL32/alBuffer.c @@ -926,14 +926,14 @@ static void LoadData(ALCcontext *context, ALbuffer *ALBuf, ALuint freq, ALsizei case UserFmtMSADPCM: DstType = FmtShort; break; } - /* TODO: Currently we can only map/preserve samples when they're not - * converted. To allow it would need some kind of double-buffering to hold - * onto a copy of the original data. + /* TODO: Currently we can only map samples when they're not converted. To + * allow it would need some kind of double-buffering to hold onto a copy of + * the original data. */ - if(access != 0) + if((access&MAP_READ_WRITE_FLAGS)) { if(UNLIKELY((long)SrcType != (long)DstType)) - SETERR_RETURN(context, AL_INVALID_VALUE,, "%s samples cannot be mapped or preserved", + SETERR_RETURN(context, AL_INVALID_VALUE,, "%s samples cannot be mapped", NameFromUserFmtType(SrcType)); } -- cgit v1.2.3