예제 #1
0
파일: sound.c 프로젝트: nworkers/smsplus
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();
}
예제 #2
0
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);
}
예제 #3
0
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
	}
}
예제 #4
0
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
	}
}
예제 #5
0
void sound_shutdown(void)
{
    Fir_Resampler_shutdown();
    SN76489_Shutdown();
}