From 9e4e9cab04c216fc7220f1cea7b739f3f93f7639 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Mon, 4 Oct 2021 05:41:11 +0300 Subject: [PATCH] engine: restore optional upscaling depending on SOUND_DMA_SPEED value :) --- engine/client/s_mix.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/engine/client/s_mix.c b/engine/client/s_mix.c index 78bef1db..f79f7aee 100644 --- a/engine/client/s_mix.c +++ b/engine/client/s_mix.c @@ -988,6 +988,7 @@ void MIX_UpsampleAllPaintbuffers( int end, int count ) // mix 11khz sounds: MIX_MixChannelsToPaintbuffer( end, SOUND_11k, SOUND_11k ); +#if SOUND_DMA_SPEED >= SOUND_22k // upsample all 11khz buffers by 2x // only upsample roombuffer if dsp fx are on KDB: perf MIX_SetCurrentPaintbuffer( IROOMBUFFER ); // operates on MixUpSample @@ -995,7 +996,9 @@ void MIX_UpsampleAllPaintbuffers( int end, int count ) // mix 22khz sounds: MIX_MixChannelsToPaintbuffer( end, SOUND_22k, SOUND_22k ); +#endif +#if SOUND_DMA_SPEED >= SOUND_44k // upsample all 22khz buffers by 2x // only upsample roombuffer if dsp fx are on KDB: perf MIX_SetCurrentPaintbuffer( IROOMBUFFER ); @@ -1003,6 +1006,7 @@ void MIX_UpsampleAllPaintbuffers( int end, int count ) // mix all 44khz sounds to all active paintbuffers MIX_MixChannelsToPaintbuffer( end, SOUND_44k, SOUND_DMA_SPEED ); +#endif // mix raw samples from the video streams MIX_SetCurrentPaintbuffer( IROOMBUFFER );