aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-01-26 16:41:14 -0800
committerChris Robinson <[email protected]>2018-01-26 16:41:14 -0800
commit3ba4746ff852c3ac6dcfb047fa51b75c1d58e5c4 (patch)
tree742f4351e00b5625d6845df93bee0faba427a6e2
parente1e1c73ae6bf89a7a6b4d27c083b68fd60647e4f (diff)
Allow preserving converted samples
-rw-r--r--OpenAL32/alBuffer.c10
1 files 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));
}