Browse Source

engine: sound: allow cubic sound interpolation

pull/2/head
Alibek Omarov 5 years ago
parent
commit
d347096396
  1. 6
      engine/client/s_mix.c

6
engine/client/s_mix.c

@ -792,8 +792,6 @@ void S_MixBufferUpsample2x( int count, portable_samplepair_t *pbuffer, portable_ @@ -792,8 +792,6 @@ void S_MixBufferUpsample2x( int count, portable_samplepair_t *pbuffer, portable_
pbuffer[i-1] = pbuffer[j];
}
if( !s_lerping->value ) return;
// pass forward through buffer, interpolate all even slots
switch( filtertype )
{
@ -993,7 +991,7 @@ void MIX_UpsampleAllPaintbuffers( int end, int count ) @@ -993,7 +991,7 @@ void MIX_UpsampleAllPaintbuffers( int end, int count )
// upsample all 11khz buffers by 2x
// only upsample roombuffer if dsp fx are on KDB: perf
MIX_SetCurrentPaintbuffer( IROOMBUFFER ); // operates on MixUpSample
S_MixUpsample( count / (SOUND_DMA_SPEED / SOUND_11k), FILTERTYPE_LINEAR );
S_MixUpsample( count / ( SOUND_DMA_SPEED / SOUND_11k ), s_lerping->value );
// mix 22khz sounds:
MIX_MixChannelsToPaintbuffer( end, SOUND_22k, SOUND_22k );
@ -1001,7 +999,7 @@ void MIX_UpsampleAllPaintbuffers( int end, int count ) @@ -1001,7 +999,7 @@ void MIX_UpsampleAllPaintbuffers( int end, int count )
// upsample all 22khz buffers by 2x
// only upsample roombuffer if dsp fx are on KDB: perf
MIX_SetCurrentPaintbuffer( IROOMBUFFER );
S_MixUpsample( count / ( SOUND_DMA_SPEED / SOUND_22k ), FILTERTYPE_LINEAR );
S_MixUpsample( count / ( SOUND_DMA_SPEED / SOUND_22k ), s_lerping->value );
// mix all 44khz sounds to all active paintbuffers
MIX_MixChannelsToPaintbuffer( end, SOUND_44k, SOUND_DMA_SPEED );

Loading…
Cancel
Save