mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-18 19:29:09 +00:00
Calculate block alignment properly
*sigh* This happens when you copy the formula from somewhere else... Let's do it correctly now and fix the source in plVoiceChat as well.
This commit is contained in:
@ -435,7 +435,7 @@ bool plVoiceSound::LoadSound( bool is3D )
|
||||
header.fBitsPerSample = 16;
|
||||
header.fNumChannels = 1;
|
||||
header.fNumSamplesPerSec = FREQUENCY;
|
||||
header.fBlockAlign = header.fNumChannels * header.fBitsPerSample / 2;
|
||||
header.fBlockAlign = header.fNumChannels * header.fBitsPerSample / 8;
|
||||
header.fAvgBytesPerSec = header.fNumSamplesPerSec * header.fBlockAlign;
|
||||
|
||||
fDSoundBuffer = new plDSoundBuffer(0, header, true, false, false, true);
|
||||
|
Reference in New Issue
Block a user