rf5c400.cpp: Minor revert PR #6887 (#6889)

This commit is contained in:
cam900 2020-07-05 00:54:19 +09:00 committed by GitHub
parent c1b7b2f097
commit 9eb34bea94
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -209,8 +209,8 @@ void rf5c400_device::sound_stream_update(sound_stream &stream, stream_sample_t *
stream_sample_t *buf1 = outputs[1];
// start = ((channel->startH & 0xFF00) << 8) | channel->startL;
end = ((((channel->endHloopH & 0xFF) << 16) | channel->endL) << 16) | 0xffffULL;
loop = ((((channel->endHloopH & 0xFF00) << 8) | channel->loopL) << 16);
end = ((channel->endHloopH & 0xFF) << 16) | channel->endL;
loop = ((channel->endHloopH & 0xFF00) << 8) | channel->loopL;
pos = channel->pos;
vol = channel->volume & 0xFF;
lvol = channel->pan & 0xFF;
@ -296,10 +296,10 @@ void rf5c400_device::sound_stream_update(sound_stream &stream, stream_sample_t *
*buf1++ += sample * pan_table[rvol];
pos += channel->step;
if (pos > end)
if ((pos>>16) > end)
{
pos -= loop;
pos &= ~0xffffULL;
pos -= loop<<16;
pos &= 0xFFFFFF0000ULL;
}
}