★ PROGRAMMER'S GUIDE ★ Sound I / F library
void sndStart ()
{
SndIniDt sys_ini; / * Data storage area for system boot * /
SND_INI_PRG_ADR (sys_ini) = (Uint16 *) 0x22002400;
/ * 68K Program storage start address setting * /
SND_INI_PRG_SZ (sys_ini) = (Uint16 *) 0x4fc8;
/ * 68K program size setting * /
SND_INI_ARA_ADR (sys_ini) = (Uint16 *) 0x22004400;
/ * Sound area map storage start address setting * /
SND_INI_ARA_SZ (sys_ini) = 0x0550;
/ * Sound area map size (word specification) setting * /
SND_Init (& sys_ini); / * Sound system boot * /
...
}
void sndCnt ()
{
sndStart (); / * Sound system start (see item above) * /
SND_ChgMap (2); / * Change sound area map * /
SND_MoveData ((Uint16 *) 0x22005000, 0xffff, SND_KD_SEQ, 2);
/ * Sound data transfer (sequence) * /
SND_MoveData ((Uint16 *) 0x22005500, 0xffff, SND_KD_TONE, 2);
/ * Sound data transfer (tone) * /
SND_SetTlVl (15); / * Overall volume setting * /
SND_StartSeq (0, 2, 5, 0); / * Start sequence * /
...
}
void sndHantei ()
{
SndSeqStat status; / * Sequence status storage area definition * /
...
SND_GetSeqStat (& status, 0); / * Get sequence status * /
if (SND_SEQ_STAT_MODE (stauts) == SND_MD_STOP) {
/ * Is the sequence of pronunciation control number 0 stop? * /
SND_StartSeq (0, 2, 6, 0); / * Start sequence * /
}
}
★ PROGRAMMER'S GUIDE ★ Sound I / F library