- 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:
Randy Heit 2013-02-07 23:30:20 +00:00
parent 401ee8fafb
commit 8807330649
3 changed files with 9 additions and 11 deletions

View File

@ -124,13 +124,12 @@ int32 dumb_resample(DUMB_RESAMPLER *resampler, sample_t *dst, int32 dst_size, VO
todo_clocks_set = todo_clocks;
if ( todo_clocks_set > 256 * 65536 ) todo_clocks_set = 256 * 65536;
todo_clocks -= todo_clocks_set;
todo = ( todo_clocks_set - resampler->last_clock + inv_dt - 1 ) / inv_dt;
if ( todo < 0 ) todo = 0;
LOOP4(todo,
while ( resampler->last_clock < todo_clocks_set )
{
POKE_ALIAS(2);
pos--;
x -= SRC_CHANNELS;
);
}
todo = todo_clocks_set >> 16;
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;
if ( todo_clocks_set > 256 * 65536 ) todo_clocks_set = 256 * 65536;
todo_clocks -= todo_clocks_set;
todo = ( todo_clocks_set - resampler->last_clock + inv_dt - 1 ) / inv_dt;
if ( todo < 0 ) todo = 0;
LOOP4(todo,
while ( resampler->last_clock < todo_clocks_set )
{
POKE_ALIAS(-2);
pos++;
x += SRC_CHANNELS;
);
}
todo = todo_clocks_set >> 16;
MIX_ALIAS( todo );
}

View File

@ -117,9 +117,9 @@ int dumb_resampling_quality = DUMB_RQ_CUBIC;
*/
#define LOOP4(iterator, CONTENT) \
{ \
while (iterator) { \
while ( (iterator)-- ) \
{ \
CONTENT; \
(iterator)--; \
} \
}
#endif

View File

@ -4863,7 +4863,7 @@ static DUMB_IT_SIGRENDERER *init_sigrenderer(DUMB_IT_SIGDATA *sigdata, int n_cha
channel->channelvolume = sigdata->channel_volume[i];
channel->instrument = 0;
channel->sample = 0;
channel->note = 0;
channel->note = IT_NOTE_OFF;
channel->SFmacro = 0;
channel->filter_cutoff = 127;
channel->filter_resonance = 0;