mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-17 18:40:02 +00:00
engine: sound: allow cubic sound interpolation
This commit is contained in:
parent
54920f13df
commit
d347096396
@ -792,8 +792,6 @@ void S_MixBufferUpsample2x( int count, portable_samplepair_t *pbuffer, portable_
|
|||||||
pbuffer[i-1] = pbuffer[j];
|
pbuffer[i-1] = pbuffer[j];
|
||||||
}
|
}
|
||||||
|
|
||||||
if( !s_lerping->value ) return;
|
|
||||||
|
|
||||||
// pass forward through buffer, interpolate all even slots
|
// pass forward through buffer, interpolate all even slots
|
||||||
switch( filtertype )
|
switch( filtertype )
|
||||||
{
|
{
|
||||||
@ -993,7 +991,7 @@ void MIX_UpsampleAllPaintbuffers( int end, int count )
|
|||||||
// upsample all 11khz buffers by 2x
|
// upsample all 11khz buffers by 2x
|
||||||
// only upsample roombuffer if dsp fx are on KDB: perf
|
// only upsample roombuffer if dsp fx are on KDB: perf
|
||||||
MIX_SetCurrentPaintbuffer( IROOMBUFFER ); // operates on MixUpSample
|
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 22khz sounds:
|
||||||
MIX_MixChannelsToPaintbuffer( end, SOUND_22k, SOUND_22k );
|
MIX_MixChannelsToPaintbuffer( end, SOUND_22k, SOUND_22k );
|
||||||
@ -1001,7 +999,7 @@ void MIX_UpsampleAllPaintbuffers( int end, int count )
|
|||||||
// upsample all 22khz buffers by 2x
|
// upsample all 22khz buffers by 2x
|
||||||
// only upsample roombuffer if dsp fx are on KDB: perf
|
// only upsample roombuffer if dsp fx are on KDB: perf
|
||||||
MIX_SetCurrentPaintbuffer( IROOMBUFFER );
|
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 all 44khz sounds to all active paintbuffers
|
||||||
MIX_MixChannelsToPaintbuffer( end, SOUND_44k, SOUND_DMA_SPEED );
|
MIX_MixChannelsToPaintbuffer( end, SOUND_44k, SOUND_DMA_SPEED );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user