mirror of
https://github.com/libretro/gambatte-libretro.git
synced 2024-11-23 16:00:06 +00:00
fix broken volume on/off event notification
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@106 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
This commit is contained in:
parent
a2c291b48f
commit
9ee4396f64
@ -26,14 +26,17 @@ void EnvelopeUnit::event() {
|
||||
if (period) {
|
||||
unsigned newVol = volume;
|
||||
|
||||
if (nr2 & 8) {
|
||||
if (++newVol == 1)
|
||||
volOnOffEvent(counter);
|
||||
} else if (--newVol == 0)
|
||||
volOnOffEvent(counter);
|
||||
if (nr2 & 8)
|
||||
++newVol;
|
||||
else
|
||||
--newVol;
|
||||
|
||||
if (newVol < 0x10U) {
|
||||
volume = newVol;
|
||||
|
||||
if (volume < 2)
|
||||
volOnOffEvent(counter);
|
||||
|
||||
counter += period << 15;
|
||||
} else
|
||||
counter = COUNTER_DISABLED;
|
||||
|
Loading…
Reference in New Issue
Block a user