static void __fastcall NSDPLAYReset(void) { Uint freq = NESAudioFrequencyGet(); nsdplayer.cleft = 0; nsdplayer.cpfc = 0; nsdplayer.remainsyncs = 0; nsdplayer.total_cycles = 0; nsdplayer.current = nsdplayer.top; if (nsdplayer.sync2) { nsdplayer.cps = DivFix(nsdplayer.sync2, (256 - nsdplayer.sync1) * freq, SHIFT_CPS); nsdplayer.cpf = 0; nsdplayer.sync0 = 0; } else { nsdplayer.cps = DivFix(NES_BASECYCLES, 12 * freq, SHIFT_CPS); switch (nsdplayer.sync1) { default: nsdplayer.cpf = 0; nsdplayer.sync0 = 0; break; case 1: nsdplayer.cpf = DivFix(NES_BASECYCLES, 12 * 60, 0); nsdplayer.sync0 = 1; break; case 2: nsdplayer.cpf = DivFix(NES_BASECYCLES, 12 * 50, 0); nsdplayer.sync0 = 1; break; } } nsdplayer.isplaying = 1; }
static void __fastcall FME7SoundReset(void* pNezPlay) { PSGSOUND *psgs = ((NSFNSF*)((NEZ_PLAY*)pNezPlay)->nsf)->psgs; psgs->psgp->reset(psgs->psgp->ctx, BASECYCLES_NES / 12, NESAudioFrequencyGet(pNezPlay)); }
static void __fastcall VRC7SoundReset(void) { if (usertone_enable[0]) sndp.kmif->setinst(sndp.kmif->ctx, 0, usertone[0], 16 * 19); sndp.kmif->reset(sndp.kmif->ctx, MASTER_CLOCK, NESAudioFrequencyGet()); }