Exemple #1
0
int DAC_sh_start(const struct MachineSound *msound)
{
	int i;
	const struct DACinterface *intf = msound->sound_interface;


	DAC_build_voltable();

	for (i = 0;i < intf->num;i++)
	{
		char name[40];


		sprintf(name,"DAC #%d",i);
		channel[i] = stream_init(name,intf->mixing_level[i],Machine->sample_rate,
				i,DAC_update);

		if (channel[i] == -1)
			return 1;

		output[i] = 0;
	}

	return 0;
}
Exemple #2
0
static DEVICE_START( dac )
{
	dac_state *info = get_safe_token(device);

	DAC_build_voltable(info);

	info->channel = stream_create(device,0,1,device->clock() ? device->clock() : DEFAULT_SAMPLE_RATE,info,DAC_update);
	info->output = 0;

	state_save_register_device_item(device, 0, info->output);
}
Exemple #3
0
static DEVICE_START( dac )
{
	dac_state *info = get_safe_token(device);

	DAC_build_voltable(info);

	info->channel = device->machine->sound().stream_alloc(*device,0,1,device->clock() ? device->clock() : DEFAULT_SAMPLE_RATE,info,DAC_update);
	info->output = 0;

	device->save_item(NAME(info->output));
}
Exemple #4
0
static void *dac_start(int sndindex, int clock, const void *config)
{
	struct dac_info *info;

	info = auto_malloc(sizeof(*info));
	memset(info, 0, sizeof(*info));

	DAC_build_voltable(info);

	info->channel = stream_create(0,1,clock ? clock : DEFAULT_SAMPLE_RATE,info,DAC_update);
	info->output = 0;

	state_save_register_item("dac", sndindex, info->output);

	return info;
}