mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-02-07 07:21:01 +00:00
- Update DUMB to revision c0fc19ef2e756ef25aa44ca3775b4afed3f02c9c
- Changed aliased resampler loop conditions a bit to fix some bugs - Removed resampler loop unrolling, as it actually made things slightly slower - Fixed a bug with songs triggering notes on the first order with instrument changes before any note commands have been triggered SVN r4077 (trunk)
This commit is contained in:
parent
401ee8fafb
commit
8807330649
3 changed files with 9 additions and 11 deletions
|
@ -124,13 +124,12 @@ int32 dumb_resample(DUMB_RESAMPLER *resampler, sample_t *dst, int32 dst_size, VO
|
||||||
todo_clocks_set = todo_clocks;
|
todo_clocks_set = todo_clocks;
|
||||||
if ( todo_clocks_set > 256 * 65536 ) todo_clocks_set = 256 * 65536;
|
if ( todo_clocks_set > 256 * 65536 ) todo_clocks_set = 256 * 65536;
|
||||||
todo_clocks -= todo_clocks_set;
|
todo_clocks -= todo_clocks_set;
|
||||||
todo = ( todo_clocks_set - resampler->last_clock + inv_dt - 1 ) / inv_dt;
|
while ( resampler->last_clock < todo_clocks_set )
|
||||||
if ( todo < 0 ) todo = 0;
|
{
|
||||||
LOOP4(todo,
|
|
||||||
POKE_ALIAS(2);
|
POKE_ALIAS(2);
|
||||||
pos--;
|
pos--;
|
||||||
x -= SRC_CHANNELS;
|
x -= SRC_CHANNELS;
|
||||||
);
|
}
|
||||||
todo = todo_clocks_set >> 16;
|
todo = todo_clocks_set >> 16;
|
||||||
MIX_ALIAS( todo );
|
MIX_ALIAS( todo );
|
||||||
}
|
}
|
||||||
|
@ -229,13 +228,12 @@ int32 dumb_resample(DUMB_RESAMPLER *resampler, sample_t *dst, int32 dst_size, VO
|
||||||
todo_clocks_set = todo_clocks;
|
todo_clocks_set = todo_clocks;
|
||||||
if ( todo_clocks_set > 256 * 65536 ) todo_clocks_set = 256 * 65536;
|
if ( todo_clocks_set > 256 * 65536 ) todo_clocks_set = 256 * 65536;
|
||||||
todo_clocks -= todo_clocks_set;
|
todo_clocks -= todo_clocks_set;
|
||||||
todo = ( todo_clocks_set - resampler->last_clock + inv_dt - 1 ) / inv_dt;
|
while ( resampler->last_clock < todo_clocks_set )
|
||||||
if ( todo < 0 ) todo = 0;
|
{
|
||||||
LOOP4(todo,
|
|
||||||
POKE_ALIAS(-2);
|
POKE_ALIAS(-2);
|
||||||
pos++;
|
pos++;
|
||||||
x += SRC_CHANNELS;
|
x += SRC_CHANNELS;
|
||||||
);
|
}
|
||||||
todo = todo_clocks_set >> 16;
|
todo = todo_clocks_set >> 16;
|
||||||
MIX_ALIAS( todo );
|
MIX_ALIAS( todo );
|
||||||
}
|
}
|
||||||
|
|
|
@ -117,9 +117,9 @@ int dumb_resampling_quality = DUMB_RQ_CUBIC;
|
||||||
*/
|
*/
|
||||||
#define LOOP4(iterator, CONTENT) \
|
#define LOOP4(iterator, CONTENT) \
|
||||||
{ \
|
{ \
|
||||||
while (iterator) { \
|
while ( (iterator)-- ) \
|
||||||
|
{ \
|
||||||
CONTENT; \
|
CONTENT; \
|
||||||
(iterator)--; \
|
|
||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -4863,7 +4863,7 @@ static DUMB_IT_SIGRENDERER *init_sigrenderer(DUMB_IT_SIGDATA *sigdata, int n_cha
|
||||||
channel->channelvolume = sigdata->channel_volume[i];
|
channel->channelvolume = sigdata->channel_volume[i];
|
||||||
channel->instrument = 0;
|
channel->instrument = 0;
|
||||||
channel->sample = 0;
|
channel->sample = 0;
|
||||||
channel->note = 0;
|
channel->note = IT_NOTE_OFF;
|
||||||
channel->SFmacro = 0;
|
channel->SFmacro = 0;
|
||||||
channel->filter_cutoff = 127;
|
channel->filter_cutoff = 127;
|
||||||
channel->filter_resonance = 0;
|
channel->filter_resonance = 0;
|
||||||
|
|
Loading…
Reference in a new issue