Previous 199869 Revisions Next

r17508 Monday 27th August, 2012 at 17:24:48 UTC by smf
(MESS) fixed overflow in MSVC caused by negative values being specified as signed.
[src/mess/audio]vboy.c

trunk/src/mess/audio/vboy.c
r17507r17508
3232#define S5SWP      0x51c
3333#define SST0P      0x580
3434
35static const INT16 outTbl[64][32] = {
35static const UINT16 outTbl[64][32] = {
3636    { 0x0000, 0xffe0, 0xffc0, 0xffa0, 0xff80, 0xff60, 0xff40, 0xff20, 0xff00, 0xfee0, 0xfec0, 0xfea0, 0xfe80, 0xfe60, 0xfe40, 0xfe20,
3737      0xfe00, 0xfde0, 0xfdc0, 0xfda0, 0xfd80, 0xfd60, 0xfd40, 0xfd20, 0xfd00, 0xfce0, 0xfcc0, 0xfca0, 0xfc80, 0xfc60, 0xfc40, 0xfc20},
3838    { 0x0000, 0xffe1, 0xffc2, 0xffa3, 0xff84, 0xff65, 0xff46, 0xff27, 0xff08, 0xfee9, 0xfeca, 0xfeab, 0xfe8c, 0xfe6d, 0xfe4e, 0xfe2f,
r17507r17508
350350            }
351351         }
352352
353         outTblPtr = outTbl[channel->sample[channel->offset]];
353         outTblPtr = (INT16 *) outTbl[channel->sample[channel->offset]];
354354         if (outLeft)  note_left  += outTblPtr[outLeft ];
355355         if (outRight) note_right += outTblPtr[outRight];
356356         channel->offset++;

Previous 199869 Revisions Next


© 1997-2024 The MAME Team