summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author cam900 <dbtlrchl@naver.com>2020-07-05 00:54:19 +0900
committer GitHub <noreply@github.com>2020-07-04 17:54:19 +0200
commit9eb34bea94ecb8bb2c3a3e78d3c0bbe197bf4963 (patch)
tree2ecce7261883df4d1664349fbeb3817bcb6d5074
parentc1b7b2f0976aaae3b1867feddb23745d65afc532 (diff)
rf5c400.cpp: Minor revert PR #6887 (#6889)
-rw-r--r--src/devices/sound/rf5c400.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/devices/sound/rf5c400.cpp b/src/devices/sound/rf5c400.cpp
index 9fafa101e23..43fef5db852 100644
--- a/src/devices/sound/rf5c400.cpp
+++ b/src/devices/sound/rf5c400.cpp
@@ -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;
}
}