mirror of
https://github.com/holub/mame
synced 2025-04-22 00:11:58 +03:00
es5503: cleaner fix for preserving the full accumulator phase on looping. [Kelvin Sherlock, R. Belmont]
This commit is contained in:
parent
b8dc258749
commit
22aa30448f
@ -104,19 +104,7 @@ void es5503_device::halt_osc(int onum, int type, uint32_t *accumulator, int ress
|
||||
else // preserve the relative phase of the oscillator when looping
|
||||
{
|
||||
uint16_t wtsize = pOsc->wtsize - 1;
|
||||
uint32_t altram = (*accumulator) >> resshift;
|
||||
uint32_t fraction = (*accumulator) & ((1 << resshift) - 1);
|
||||
|
||||
if (altram > wtsize)
|
||||
{
|
||||
altram -= wtsize;
|
||||
}
|
||||
else
|
||||
{
|
||||
altram = 0;
|
||||
}
|
||||
|
||||
*accumulator = (altram << resshift) + fraction;
|
||||
*accumulator -= (wtsize << resshift);
|
||||
}
|
||||
|
||||
// if we're in swap mode, start the partner
|
||||
@ -135,18 +123,7 @@ void es5503_device::halt_osc(int onum, int type, uint32_t *accumulator, int ress
|
||||
|
||||
// preserve the phase in this case too
|
||||
uint16_t wtsize = pOsc->wtsize - 1;
|
||||
uint32_t altram = (*accumulator) >> resshift;
|
||||
uint32_t fraction = (*accumulator) & ((1 << resshift) - 1);
|
||||
if (altram > wtsize)
|
||||
{
|
||||
altram -= wtsize;
|
||||
}
|
||||
else
|
||||
{
|
||||
altram = 0;
|
||||
}
|
||||
|
||||
*accumulator = (altram << resshift) + fraction;
|
||||
*accumulator -= (wtsize << resshift);
|
||||
}
|
||||
}
|
||||
// IRQ enabled for this voice?
|
||||
|
Loading…
Reference in New Issue
Block a user