aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alBuffer.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2013-06-05 01:52:49 -0700
committerChris Robinson <[email protected]>2013-06-05 01:52:49 -0700
commita371de080b01d9ea9dc38dd386b5903f7e4d8282 (patch)
tree2d6ad48f76bf1580430d0d6aa3dbd2bf7ab2d047 /OpenAL32/alBuffer.c
parent0e0f70b2888c23debeefd80603f8c6f0c1ad4880 (diff)
Silence some clang warnings
Diffstat (limited to 'OpenAL32/alBuffer.c')
-rw-r--r--OpenAL32/alBuffer.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/OpenAL32/alBuffer.c b/OpenAL32/alBuffer.c
index 2daa2e3d..44eacaff 100644
--- a/OpenAL32/alBuffer.c
+++ b/OpenAL32/alBuffer.c
@@ -455,7 +455,7 @@ AL_API ALvoid AL_APIENTRY alBufferSubDataSOFT(ALuint buffer, ALenum format, cons
offset = offset/OldBytes * Bytes;
length = length/OldBytes/Channels;
}
- ConvertData(&((ALubyte*)ALBuf->data)[offset], ALBuf->FmtType,
+ ConvertData((char*)ALBuf->data+offset, (enum UserFmtType)ALBuf->FmtType,
data, SrcType, Channels, length);
WriteUnlock(&ALBuf->lock);
}
@@ -531,7 +531,7 @@ AL_API void AL_APIENTRY alBufferSubSamplesSOFT(ALuint buffer,
/* offset -> byte offset */
offset *= FrameSize;
- ConvertData(&((ALubyte*)ALBuf->data)[offset], ALBuf->FmtType,
+ ConvertData((char*)ALBuf->data+offset, (enum UserFmtType)ALBuf->FmtType,
data, type, ChannelsFromFmt(ALBuf->FmtChannels), samples);
WriteUnlock(&ALBuf->lock);
}
@@ -581,7 +581,8 @@ AL_API void AL_APIENTRY alGetBufferSamplesSOFT(ALuint buffer,
/* offset -> byte offset */
offset *= FrameSize;
- ConvertData(data, type, &((ALubyte*)ALBuf->data)[offset], ALBuf->FmtType,
+ ConvertData(data, type,
+ (char*)ALBuf->data+offset, (enum UserFmtType)ALBuf->FmtType,
ChannelsFromFmt(ALBuf->FmtChannels), samples);
ReadUnlock(&ALBuf->lock);
}
@@ -1972,7 +1973,7 @@ static ALenum LoadData(ALbuffer *ALBuf, ALuint freq, ALenum NewFormat, ALsizei f
ALBuf->data = temp;
if(data != NULL)
- ConvertData(ALBuf->data, DstType, data, SrcType, NewChannels, frames);
+ ConvertData(ALBuf->data, (enum UserFmtType)DstType, data, SrcType, NewChannels, frames);
if(storesrc)
{
@@ -1985,8 +1986,8 @@ static ALenum LoadData(ALbuffer *ALBuf, ALuint freq, ALenum NewFormat, ALsizei f
}
else
{
- ALBuf->OriginalChannels = DstChannels;
- ALBuf->OriginalType = DstType;
+ ALBuf->OriginalChannels = (enum UserFmtChannels)DstChannels;
+ ALBuf->OriginalType = (enum UserFmtType)DstType;
ALBuf->OriginalSize = frames * NewBytes * NewChannels;
}