void sound_shutdown(void) { int i; if(!snd.enabled) return; /* Free emulated sound streams */ for(i = 0; i < STREAM_MAX; i++) { if(snd.stream[i]) { free(snd.stream[i]); snd.stream[i] = NULL; } } /* Free sound output buffers */ for(i = 0; i < 2; i++) { if(snd.output[i]) { free(snd.output[i]); snd.output[i] = NULL; } } /* Shut down SN76489 emulation */ SN76489_Shutdown(); /* Shut down YM2413 emulation */ FM_Shutdown(); }
void SN76489_Init(double PSGClockValue, int SamplingRate) { SN76489_Shutdown(); /* SamplingRate*16 instead of PSGClockValue/16 since division would lose some precision. blip_alloc doesn't care about the absolute sampling rate, just the ratio to clock rate. */ blip = blip_alloc(PSGClockValue, SamplingRate * 16.0, SamplingRate / 4); }
void device_stop_sn764xx(UINT8 ChipID) { sn764xx_state *info = &SN764xxData[ChipID]; switch(EMU_CORE) { case EC_MAME: sn76496_shutdown(info->chip); break; #ifdef ENABLE_ALL_CORES case EC_MAXIM: SN76489_Shutdown((SN76489_Context*)info->chip); break; #endif } }
void device_stop_sn764xx(void *_info) { sn764xx_state *info = (sn764xx_state*)_info; switch(info->EMU_CORE) { case EC_MAME: sn76496_shutdown(info->chip); break; #ifdef ENABLE_ALL_CORES case EC_MAXIM: SN76489_Shutdown((SN76489_Context*)info->chip); break; #endif } }
void sound_shutdown(void) { Fir_Resampler_shutdown(); SN76489_Shutdown(); }