mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-11 15:47:55 +00:00
engine: client: s_dsp: refactoring from hldsp
This commit is contained in:
parent
251e6ac1dc
commit
628ac376ed
@ -334,7 +334,7 @@ DLY_MovePointer
|
||||
Checks overflow and moves pointer
|
||||
============
|
||||
*/
|
||||
_inline void DLY_MovePointer( dly_t *dly )
|
||||
static void DLY_MovePointer( dly_t *dly )
|
||||
{
|
||||
if( ++dly->idelayinput >= dly->cdelaysamplesmax )
|
||||
dly->idelayinput = 0;
|
||||
@ -807,13 +807,9 @@ DSP_Process
|
||||
(xash dsp interface)
|
||||
===========
|
||||
*/
|
||||
void DSP_Process( int idsp, portable_samplepair_t *pbfront, int sampleCount )
|
||||
void DSP_Process( portable_samplepair_t *pbfront, int sampleCount )
|
||||
{
|
||||
if( dsp_off.value )
|
||||
return;
|
||||
|
||||
// don't process DSP while in menu
|
||||
if( cls.key_dest == key_menu || !sampleCount )
|
||||
if( dsp_off.value || !sampleCount )
|
||||
return;
|
||||
|
||||
// preset is already installed by CheckNewDspPresets
|
||||
@ -940,7 +936,7 @@ static void SX_Profiling_f( void )
|
||||
start = Sys_DoubleTime();
|
||||
for( calls = 10000; calls; calls-- )
|
||||
{
|
||||
DSP_Process( idsp_room, testbuffer, 512 );
|
||||
DSP_Process( testbuffer, 512 );
|
||||
}
|
||||
end = Sys_DoubleTime();
|
||||
|
||||
|
@ -999,7 +999,8 @@ void MIX_PaintChannels( int endtime )
|
||||
MIX_UpsampleAllPaintbuffers( end, count );
|
||||
|
||||
// process all sounds with DSP
|
||||
DSP_Process( idsp_room, MIX_GetPFrontFromIPaint( IROOMBUFFER ), count );
|
||||
if( cls.key_dest != key_menu )
|
||||
DSP_Process( MIX_GetPFrontFromIPaint( IROOMBUFFER ), count );
|
||||
|
||||
// add music or soundtrack from movie (no dsp)
|
||||
MIX_MixPaintbuffers( IPAINTBUFFER, IROOMBUFFER, IPAINTBUFFER, count, S_GetMasterVolume() );
|
||||
|
@ -255,8 +255,7 @@ void S_InitSounds( void );
|
||||
void SX_Init( void );
|
||||
void SX_Free( void );
|
||||
void CheckNewDspPresets( void );
|
||||
void DSP_Process( int idsp, portable_samplepair_t *pbfront, int sampleCount );
|
||||
float DSP_GetGain( int idsp );
|
||||
void DSP_Process( portable_samplepair_t *pbfront, int sampleCount );
|
||||
void DSP_ClearState( void );
|
||||
|
||||
qboolean S_Init( void );
|
||||
|
Loading…
Reference in New Issue
Block a user