void sndStart()
{
SndIniDt sys_ini; /* Data storage area for system startup */
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) settings */
SND_Init(&sys_ini); /* Start sound system */
...
}
void sndCnt()
{
sndStart(); /* Start the sound system (see 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 with pronunciation control number 0 stop? */
SND_StartSeq(0, 2, 6, 0); /* Start sequence */
}
}
★ PROGRAMMER'S GUIDE ★ Sound I/F library