[gen] Sound overflow

Richard Bannister richard at bannister.org
Wed Nov 7 21:49:43 GMT 2001


On 7/11/01 10:48 pm, James Ponder at james at squish.netake thus:

> You're saying that the code does not match the comment:
> 
> /* SN76496 outputs sound in range -0x4000 to 0x3fff
> YM2612 ouputs sound in range -0x8000 to 0x7fff - therefore
> we take 3/4 of the YM2612 and add half the SN76496 */
> 
> By my calculations (0x3fff >> 1) + (0x7fff * 3) >> 2 = 0x7ffe.

Yup. In some situations, as per the initial mail with this subject, the
value outputted exceeds 0x7FFF.

Regards,
Richard

--------------------------------------------------------------------
            Richard Bannister - http://www.bannister.org/
--------------------------------------------------------------------
                  Noli umquam docere porcum cantare;
                  perdes tempus et irritabis porcum.
--------------------------------------------------------------------





More information about the gen mailing list