#include "game_types.h"

/* Sound_InitChannel6 @ 0x08011D44 (real 56B) -- inits sound channel 6 (table+4, struct+0, enable bit 0x80). Mirrors src/matched/Sound_InitChannel6.c. */
/* Initializes sound channel 6: looks up (table[4], struct[0]), clears
   the wave register, sets enable bit 0x80 in the channel flags, and
   raises the channel strobe. Template shared by channels 0-11. */
extern int Math_InitLookup(int a, int b);

void Sound_InitChannel6(void)
{
    int *cfg = *(int **)0x020001F8;
    int *st = *(int **)0x020001F8;
    Math_InitLookup(*(int *)((char *)cfg + 4), *(int *)((char *)st + 0));
    *(volatile unsigned short *)0x04000208 = 0;
    *(volatile unsigned short *)0x03007FF8 |= 0x80;
    *(volatile unsigned short *)0x04000208 = 1;
}
