mirror of
https://github.com/TomHarte/CLK.git
synced 2025-01-26 00:30:29 +00:00
Reversed myself. I once again do not think the clock is divided by 256 for envelopes.
This commit is contained in:
parent
4ba39d13b5
commit
7eeaac23e7
@ -124,7 +124,7 @@ void AY38910::get_samples(unsigned int number_of_samples, int16_t *target)
|
|||||||
if(_envelope_divider) _envelope_divider--;
|
if(_envelope_divider) _envelope_divider--;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_envelope_divider = _envelope_period * 16;
|
_envelope_divider = _envelope_period;
|
||||||
_envelope_position ++;
|
_envelope_position ++;
|
||||||
if(_envelope_position == 32) _envelope_position = _envelope_overflow_masks[_output_registers[13]];
|
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:
|
case 11:
|
||||||
_envelope_period = (_envelope_period & ~0xff) | value;
|
_envelope_period = (_envelope_period & ~0xff) | value;
|
||||||
_envelope_divider = _envelope_period * 16;
|
_envelope_divider = _envelope_period;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 12:
|
case 12:
|
||||||
_envelope_period = (_envelope_period & 0xff) | (int)(value << 8);
|
_envelope_period = (_envelope_period & 0xff) | (int)(value << 8);
|
||||||
_envelope_divider = _envelope_period * 16;
|
_envelope_divider = _envelope_period;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 13:
|
case 13:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user