Revision 913895ab hw/fmopl.c

b/hw/fmopl.c
45 45
#define PI 3.14159265358979323846
46 46
#endif
47 47

  
48
#ifndef ARRAY_SIZE
49
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
50
#endif
51

  
48 52
/* -------------------- for debug --------------------- */
49 53
/* #define OPL_OUTPUT_LOG */
50 54
#ifdef OPL_OUTPUT_LOG
......
595 599
		OPL->AR_TABLE[i] = rate / ARRATE;
596 600
		OPL->DR_TABLE[i] = rate / DRRATE;
597 601
	}
598
	for (i = 60;i < 76;i++)
602
	for (i = 60; i < ARRAY_SIZE(OPL->AR_TABLE); i++)
599 603
	{
600 604
		OPL->AR_TABLE[i] = EG_AED-1;
601 605
		OPL->DR_TABLE[i] = OPL->DR_TABLE[60];

Also available in: Unified diff