static void audio_state_channel2 (int nr, bool perfin) { struct audio_channel_data *cdp = audio_channel + nr; bool chan_ena = (dmacon & DMA_MASTER) && (dmacon & (1 << nr)); bool old_dma = cdp->dmaenstore; int audav = adkcon & (0x01 << nr); int audap = adkcon & (0x10 << nr); int napnav = (!audav && !audap) || audav; int hpos = current_hpos (); cdp->dmaenstore = chan_ena; if (currprefs.produce_sound == 0) { zerostate (cdp); return; } audio_activate (); if ((cdp->state == 2 || cdp->state == 3) && usehacks1 () && !chan_ena && old_dma) { // DMA switched off, state=2/3 and "too fast CPU": kill DMA instantly // or CPU timed DMA wait routines in common tracker players will lose notes newsample (cdp, (cdp->dat2 >> 0) & 0xff); if (napnav) setirq (nr); zerostate (cdp); return; }
void audio_switch_deactivate(void) { if (audio_deactivated) { audio_activate(); } else { audio_deactivate(); } }
static void sndboard_vsync_toccata(void) { struct toccata_data *data = &toccata; if (data->toccata_active) { calculate_volume_toccata(); audio_activate(); } }