1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-26 08:49:37 +00:00

Reversed myself. I once again do not think the clock is divided by 256 for envelopes.

This commit is contained in:
Thomas Harte 2016-11-11 20:31:48 -05:00
parent 4ba39d13b5
commit 7eeaac23e7

View File

@ -124,7 +124,7 @@ void AY38910::get_samples(unsigned int number_of_samples, int16_t *target)
if(_envelope_divider) _envelope_divider--;
else
{
_envelope_divider = _envelope_period * 16;
_envelope_divider = _envelope_period;
_envelope_position ++;
if(_envelope_position == 32) _envelope_position = _envelope_overflow_masks[_output_registers[13]];
}
@ -215,12 +215,12 @@ void AY38910::set_register_value(uint8_t value)
case 11:
_envelope_period = (_envelope_period & ~0xff) | value;
_envelope_divider = _envelope_period * 16;
_envelope_divider = _envelope_period;
break;
case 12:
_envelope_period = (_envelope_period & 0xff) | (int)(value << 8);
_envelope_divider = _envelope_period * 16;
_envelope_divider = _envelope_period;
break;
case 13: