aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2008-11-01 16:37:32 -0700
committerChris Robinson <[email protected]>2008-11-01 16:37:32 -0700
commita7c62dbabc19a115577b1015e835b82ac21904f8 (patch)
treeaa778ba2ca142c9bbe20276e399b77af352aa8ff /OpenAL32
parenteda1e41152a8614533ec4c33982816185cdcc978 (diff)
More padding fixes
Diffstat (limited to 'OpenAL32')
-rw-r--r--OpenAL32/alBuffer.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/OpenAL32/alBuffer.c b/OpenAL32/alBuffer.c
index 27ff69fc..54fce5f8 100644
--- a/OpenAL32/alBuffer.c
+++ b/OpenAL32/alBuffer.c
@@ -261,8 +261,8 @@ ALAPI ALvoid ALAPIENTRY alBufferData(ALuint buffer,ALenum format,const ALvoid *d
ALint LeftSample,LeftIndex;
ALint RightSample,RightIndex;
ALuint LeftIMACode,RightIMACode;
+ ALsizei padding = 2;
ALbuffer *ALBuf;
- ALsizei padding;
ALsizei i,j,k;
ALvoid *temp;
@@ -306,9 +306,6 @@ ALAPI ALvoid ALAPIENTRY alBufferData(ALuint buffer,ALenum format,const ALvoid *d
break;
}
- padding = freq / LOWPASSFREQCUTOFF;
- if(padding < 1) padding = 1;
-
size /= OrigBytes;
size *= 2;
@@ -398,9 +395,6 @@ ALAPI ALvoid ALAPIENTRY alBufferData(ALuint buffer,ALenum format,const ALvoid *d
break;
case AL_FORMAT_MONO_IMA4:
- padding = freq / LOWPASSFREQCUTOFF;
- if(padding < 1) padding = 1;
-
// Here is where things vary:
// nVidia and Apple use 64+1 samples per block => block_size=36 bytes
// Most PC sound software uses 2040+1 samples per block -> block_size=1024 bytes
@@ -465,9 +459,6 @@ ALAPI ALvoid ALAPIENTRY alBufferData(ALuint buffer,ALenum format,const ALvoid *d
break;
case AL_FORMAT_STEREO_IMA4:
- padding = freq / LOWPASSFREQCUTOFF;
- if(padding < 1) padding = 1;
-
// Here is where things vary:
// nVidia and Apple use 64+1 samples per channel per block => block_size=72 bytes
// Most PC sound software uses 2040+1 samples per channel per block -> block_size=2048 bytes