diff options
author | Chris Robinson <[email protected]> | 2007-12-06 22:32:02 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2007-12-06 22:32:02 -0800 |
commit | d608df5b22f74af0c73d69bf6049bc0d729d8c5a (patch) | |
tree | 2f7fd7bdb62686d7e11e4a0717c7098cc1cd4a50 | |
parent | b4f4a46f7b4bca5ed29c93329ae079547fe314ce (diff) |
More casts
-rw-r--r-- | Alc/ALu.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -627,21 +627,21 @@ ALvoid aluMixData(ALCcontext *ALContext,ALvoid *buffer,ALsizei size,ALenum forma case AL_FORMAT_MONO8: for(i = 0;i < SamplesToDo;i++) { - *((ALubyte*)buffer) = (aluF2S(DryBuffer[i][0]+DryBuffer[i][1]+WetBuffer[i][0]+WetBuffer[i][1])>>8)+128; + *((ALubyte*)buffer) = (ALubyte)((aluF2S(DryBuffer[i][0]+DryBuffer[i][1]+WetBuffer[i][0]+WetBuffer[i][1])>>8)+128); buffer = ((ALubyte*)buffer) + 1; } break; case AL_FORMAT_STEREO8: for(i = 0;i < SamplesToDo*2;i++) { - *((ALubyte*)buffer) = (aluF2S(DryBuffer[i>>1][i&1]+WetBuffer[i>>1][i&1])>>8)+128; + *((ALubyte*)buffer) = (ALubyte)((aluF2S(DryBuffer[i>>1][i&1]+WetBuffer[i>>1][i&1])>>8)+128); buffer = ((ALubyte*)buffer) + 1; } break; case AL_FORMAT_QUAD8: for(i = 0;i < SamplesToDo*4;i++) { - *((ALubyte*)buffer) = (aluF2S(DryBuffer[i>>2][i&3]+WetBuffer[i>>2][i&3])>>8)+128; + *((ALubyte*)buffer) = (ALubyte)((aluF2S(DryBuffer[i>>2][i&3]+WetBuffer[i>>2][i&3])>>8)+128); buffer = ((ALubyte*)buffer) + 1; } break; |