aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2011-10-02 07:31:26 -0700
committerChris Robinson <[email protected]>2011-10-02 07:31:26 -0700
commita05006b06a6ce4eff43e7e5317bbcf5984e72bb4 (patch)
treed93af2cbe7d80b0abcb4e9473a6db8642fc81a1e
parenteb0b96752a61c51e0625a3b7578291210e9b7542 (diff)
Rename some parameters
-rw-r--r--OpenAL32/Include/alMain.h6
-rw-r--r--OpenAL32/alBuffer.c36
2 files changed, 21 insertions, 21 deletions
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h
index 1a771f4b..74a8959c 100644
--- a/OpenAL32/Include/alMain.h
+++ b/OpenAL32/Include/alMain.h
@@ -110,13 +110,13 @@ typedef void (AL_APIENTRY*LPALGETBUFFERSAMPLESSOFT)(ALuint,ALsizei,ALsizei,ALenu
typedef ALboolean (AL_APIENTRY*LPALISBUFFERFORMATSUPPORTEDSOFT)(ALenum);
#ifdef AL_ALEXT_PROTOTYPES
AL_API void AL_APIENTRY alBufferSamplesSOFT(ALuint buffer,
- ALuint samplerate, ALenum internalformat, ALsizei frames,
+ ALuint samplerate, ALenum internalformat, ALsizei samples,
ALenum channels, ALenum type, const ALvoid *data);
AL_API void AL_APIENTRY alBufferSubSamplesSOFT(ALuint buffer,
- ALsizei offset, ALsizei frames,
+ ALsizei offset, ALsizei samples,
ALenum channels, ALenum type, const ALvoid *data);
AL_API void AL_APIENTRY alGetBufferSamplesSOFT(ALuint buffer,
- ALsizei offset, ALsizei frames,
+ ALsizei offset, ALsizei samples,
ALenum channels, ALenum type, ALvoid *data);
AL_API ALboolean AL_APIENTRY alIsBufferFormatSupportedSOFT(ALenum format);
#endif
diff --git a/OpenAL32/alBuffer.c b/OpenAL32/alBuffer.c
index f3ecb3f5..5205c431 100644
--- a/OpenAL32/alBuffer.c
+++ b/OpenAL32/alBuffer.c
@@ -493,7 +493,7 @@ AL_API ALvoid AL_APIENTRY alBufferSubDataSOFT(ALuint buffer,ALenum format,const
AL_API void AL_APIENTRY alBufferSamplesSOFT(ALuint buffer,
- ALuint samplerate, ALenum internalformat, ALsizei frames,
+ ALuint samplerate, ALenum internalformat, ALsizei samples,
ALenum channels, ALenum type, const ALvoid *data)
{
ALCcontext *Context;
@@ -507,7 +507,7 @@ AL_API void AL_APIENTRY alBufferSamplesSOFT(ALuint buffer,
device = Context->Device;
if((ALBuf=LookupBuffer(device, buffer)) == NULL)
alSetError(Context, AL_INVALID_NAME);
- else if(frames < 0 || samplerate == 0)
+ else if(samples < 0 || samplerate == 0)
alSetError(Context, AL_INVALID_VALUE);
else if(IsValidType(type) == AL_FALSE || IsValidChannels(channels) == AL_FALSE)
alSetError(Context, AL_INVALID_ENUM);
@@ -516,11 +516,11 @@ AL_API void AL_APIENTRY alBufferSamplesSOFT(ALuint buffer,
err = AL_NO_ERROR;
if(type == UserFmtIMA4)
{
- if((frames%65) == 0) frames /= 65;
+ if((samples%65) == 0) samples /= 65;
else err = AL_INVALID_VALUE;
}
if(err == AL_NO_ERROR)
- err = LoadData(ALBuf, samplerate, internalformat, frames,
+ err = LoadData(ALBuf, samplerate, internalformat, samples,
channels, type, data, AL_FALSE);
if(err != AL_NO_ERROR)
alSetError(Context, err);
@@ -530,7 +530,7 @@ AL_API void AL_APIENTRY alBufferSamplesSOFT(ALuint buffer,
}
AL_API void AL_APIENTRY alBufferSubSamplesSOFT(ALuint buffer,
- ALsizei offset, ALsizei frames,
+ ALsizei offset, ALsizei samples,
ALenum channels, ALenum type, const ALvoid *data)
{
ALCcontext *Context;
@@ -543,7 +543,7 @@ AL_API void AL_APIENTRY alBufferSubSamplesSOFT(ALuint buffer,
device = Context->Device;
if((ALBuf=LookupBuffer(device, buffer)) == NULL)
alSetError(Context, AL_INVALID_NAME);
- else if(frames < 0 || offset < 0 || (frames > 0 && data == NULL))
+ else if(samples < 0 || offset < 0 || (samples > 0 && data == NULL))
alSetError(Context, AL_INVALID_VALUE);
else if(IsValidType(type) == AL_FALSE)
alSetError(Context, AL_INVALID_ENUM);
@@ -557,19 +557,19 @@ AL_API void AL_APIENTRY alBufferSubSamplesSOFT(ALuint buffer,
FrameCount = ALBuf->size / FrameSize;
if(channels != (ALenum)ALBuf->FmtChannels)
alSetError(Context, AL_INVALID_ENUM);
- else if((ALuint)offset > FrameCount || (ALuint)frames > FrameCount-offset)
+ else if((ALuint)offset > FrameCount || (ALuint)samples > FrameCount-offset)
alSetError(Context, AL_INVALID_VALUE);
- else if(type == UserFmtIMA4 && (frames%65) != 0)
+ else if(type == UserFmtIMA4 && (samples%65) != 0)
alSetError(Context, AL_INVALID_VALUE);
else
{
/* offset -> byte offset */
offset *= FrameSize;
- /* frames -> IMA4 block count */
- if(type == UserFmtIMA4) frames /= 65;
+ /* samples -> IMA4 block count */
+ if(type == UserFmtIMA4) samples /= 65;
ConvertData(&((ALubyte*)ALBuf->data)[offset], ALBuf->FmtType,
data, type,
- ChannelsFromFmt(ALBuf->FmtChannels), frames);
+ ChannelsFromFmt(ALBuf->FmtChannels), samples);
}
WriteUnlock(&ALBuf->lock);
}
@@ -578,7 +578,7 @@ AL_API void AL_APIENTRY alBufferSubSamplesSOFT(ALuint buffer,
}
AL_API void AL_APIENTRY alGetBufferSamplesSOFT(ALuint buffer,
- ALsizei offset, ALsizei frames,
+ ALsizei offset, ALsizei samples,
ALenum channels, ALenum type, ALvoid *data)
{
ALCcontext *Context;
@@ -591,7 +591,7 @@ AL_API void AL_APIENTRY alGetBufferSamplesSOFT(ALuint buffer,
device = Context->Device;
if((ALBuf=LookupBuffer(device, buffer)) == NULL)
alSetError(Context, AL_INVALID_NAME);
- else if(frames < 0 || offset < 0 || (frames > 0 && data == NULL))
+ else if(samples < 0 || offset < 0 || (samples > 0 && data == NULL))
alSetError(Context, AL_INVALID_VALUE);
else if(IsValidType(type) == AL_FALSE)
alSetError(Context, AL_INVALID_ENUM);
@@ -605,19 +605,19 @@ AL_API void AL_APIENTRY alGetBufferSamplesSOFT(ALuint buffer,
FrameCount = ALBuf->size / FrameSize;
if(channels != (ALenum)ALBuf->FmtChannels)
alSetError(Context, AL_INVALID_ENUM);
- else if((ALuint)offset > FrameCount || (ALuint)frames > FrameCount-offset)
+ else if((ALuint)offset > FrameCount || (ALuint)samples > FrameCount-offset)
alSetError(Context, AL_INVALID_VALUE);
- else if(type == UserFmtIMA4 && (frames%65) != 0)
+ else if(type == UserFmtIMA4 && (samples%65) != 0)
alSetError(Context, AL_INVALID_VALUE);
else
{
/* offset -> byte offset */
offset *= FrameSize;
- /* frames -> IMA4 block count */
- if(type == UserFmtIMA4) frames /= 65;
+ /* samples -> IMA4 block count */
+ if(type == UserFmtIMA4) samples /= 65;
ConvertData(data, type,
&((ALubyte*)ALBuf->data)[offset], ALBuf->FmtType,
- ChannelsFromFmt(ALBuf->FmtChannels), frames);
+ ChannelsFromFmt(ALBuf->FmtChannels), samples);
}
ReadUnlock(&ALBuf->lock);
}