duke3d: further optimize audio mixing

Rather than holding intermediate results as fixed-point, this converts them
directly to normal integers (in the range of the PCM sample) while mixing,
instead of waiting till the end to perform a separate shifting step. Also,
this precalculates some constants in the reverb code.

Change-Id: Ie04e444d145bc28ce67eef9ae0ead6d328acf28a
This commit is contained in:
Franklin Wei 2018-01-05 17:25:03 -05:00
parent 69ff35ac49
commit cf07bb328d
5 changed files with 65 additions and 52 deletions

View file

@ -728,6 +728,7 @@ void CONFIG_ReadSetup( void )
NumBits = 16;
SCRIPT_GetNumber( scripthandle, "Sound Setup", "MixRate",&MixRate);
MixRate = RB_SAMPR;
printf("MixRate = %d Hz", MixRate);
SCRIPT_GetNumber( scripthandle, "Sound Setup", "MidiPort",&MidiPort);
SCRIPT_GetNumber( scripthandle, "Sound Setup", "BlasterAddress",&dummy);
BlasterConfig.Address = dummy;