示例#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 sound_shutdown(void)
{
    if(!snd.enabled)
        return;

    /* Shut down SN76489 emulation */
	SN76496Exit();

    /* Shut down YM2413 emulation */
	FM_Shutdown();

	snd.enabled = 0;
}