Exemplo n.º 1
0
int AY8910_sh_start(void)
{

    if (AY8910_init(8000000, SAMPLE_RATE, NULL, NULL, NULL, NULL) != 0)
	return 1;
    build_mixer_table();

    return 0;
}
Exemplo n.º 2
0
int AY8910_sh_start(const struct MachineSound *msound)
{
	int chip;
	const struct AY8910interface *intf = msound->sound_interface;

	num = intf->num;

	for (chip = 0;chip < num;chip++)
	{
		if (AY8910_init(sound_name(msound),chip+ym_num,intf->baseclock,
				intf->mixing_level[chip] & 0xffff,
				Machine->sample_rate,
				intf->portAread[chip],intf->portBread[chip],
				intf->portAwrite[chip],intf->portBwrite[chip]) != 0)
			return 1;
		build_mixer_table(chip+ym_num);
	}
	return 0;
}
Exemplo n.º 3
0
void *ay8910_start_ym(int chip_type, int sndindex, int clock, int streams,
		read8_handler portAread, read8_handler portBread,
		write8_handler portAwrite, write8_handler portBwrite)
{
	struct AY8910 *info;

	info = auto_malloc(sizeof(*info));
	memset(info, 0, sizeof(*info));
	info->index = sndindex;
	info->streams = streams;

	AY8910_init(info, streams, clock,
			clock/8,
			portAread,portBread,
			portAwrite,portBwrite);

	build_mixer_table(info);
	AY8910_statesave(info, sndindex);

	return info;
}