コード例 #1
0
ファイル: 2612intf.c プロジェクト: Paulodx/sdl-mame-wii
INLINE ym2612_state *get_safe_token(const device_config *device)
{
	assert(device != NULL);
	assert(device->token != NULL);
	assert(device->type == SOUND);
	assert(sound_get_type(device) == SOUND_YM2612 || sound_get_type(device) == SOUND_YM3438);
	return (ym2612_state *)device->token;
}
コード例 #2
0
ファイル: info.c プロジェクト: nitrologic/emu
static void print_game_sampleof(FILE *out, const game_driver *game, const machine_config *config)
{
#if (HAS_SAMPLES)
	const device_config *device;

	for (device = sound_first(config); device != NULL; device = sound_next(device))
		if (sound_get_type(device) == SOUND_SAMPLES)
		{
			const char *const *samplenames = ((const samples_interface *)device->static_config)->samplenames;
			if (samplenames != NULL)
			{
				int sampnum;

				/* iterate over sample names */
				for (sampnum = 0; samplenames[sampnum] != NULL; sampnum++)
				{
					const char *cursampname = samplenames[sampnum];

					/* only output sampleof if different from the game name */
					if (cursampname[0] == '*' && strcmp(cursampname + 1, game->name) != 0)
						fprintf(out, " sampleof=\"%s\"", xml_normalize_string(cursampname + 1));
				}
			}
		}
#endif
}
コード例 #3
0
ファイル: ymf278b.c プロジェクト: nitrologic/emu
INLINE YMF278BChip *get_safe_token(const device_config *device)
{
	assert(device != NULL);
	assert(device->token != NULL);
	assert(device->type == SOUND);
	assert(sound_get_type(device) == SOUND_YMF278B);
	return (YMF278BChip *)device->token;
}
コード例 #4
0
ファイル: okim6258.c プロジェクト: nitrologic/emu
INLINE okim6258_state *get_safe_token(const device_config *device)
{
	assert(device != NULL);
	assert(device->token != NULL);
	assert(device->type == SOUND);
	assert(sound_get_type(device) == SOUND_OKIM6258);
	return (okim6258_state *)device->token;
}
コード例 #5
0
ファイル: digitalk.c プロジェクト: nitrologic/emu
INLINE digitalker *get_safe_token(const device_config *device)
{
	assert(device != NULL);
	assert(device->token != NULL);
	assert(device->type == SOUND);
	assert(sound_get_type(device) == SOUND_DIGITALKER);
	return (digitalker *)device->token;
}
コード例 #6
0
ファイル: n63701x.c プロジェクト: Paulodx/sdl-mame-wii
INLINE namco_63701x *get_safe_token(const device_config *device)
{
	assert(device != NULL);
	assert(device->token != NULL);
	assert(device->type == SOUND);
	assert(sound_get_type(device) == SOUND_NAMCO_63701X);
	return (namco_63701x *)device->token;
}
コード例 #7
0
ファイル: 2151intf.c プロジェクト: AltimorTASDK/shmupmametgm
INLINE ym2151_state *get_safe_token(running_device *device)
{
	assert(device != NULL);
	assert(device->token != NULL);
	assert(device->type == SOUND);
	assert(sound_get_type(device) == SOUND_YM2151);
	return (ym2151_state *)device->token;
}
コード例 #8
0
ファイル: snkwave.c プロジェクト: AltimorTASDK/shmupmametgm
INLINE snkwave_state *get_safe_token(running_device *device)
{
	assert(device != NULL);
	assert(device->token != NULL);
	assert(device->type == SOUND);
	assert(sound_get_type(device) == SOUND_SNKWAVE);
	return (snkwave_state *)device->token;
}
コード例 #9
0
ファイル: ymz280b.c プロジェクト: i-willh/imame4all
INLINE ymz280b_state *get_safe_token(const device_config *device)
{
    assert(device != NULL);
    assert(device->token != NULL);
    assert(device->type == SOUND);
    assert(sound_get_type(device) == SOUND_YMZ280B);
    return (ymz280b_state *)device->token;
}
コード例 #10
0
ファイル: dmadac.c プロジェクト: nitrologic/emu
INLINE dmadac_state *get_safe_token(const device_config *device)
{
	assert(device != NULL);
	assert(device->token != NULL);
	assert(device->type == SOUND);
	assert(sound_get_type(device) == SOUND_DMADAC);
	return (dmadac_state *)device->token;
}
コード例 #11
0
ファイル: bsmt2000.c プロジェクト: Paulodx/sdl-mame-wii
INLINE bsmt2000_chip *get_safe_token(const device_config *device)
{
	assert(device != NULL);
	assert(device->token != NULL);
	assert(device->type == SOUND);
	assert(sound_get_type(device) == SOUND_BSMT2000);
	return (bsmt2000_chip *)device->token;
}
コード例 #12
0
ファイル: speaker.c プロジェクト: AltimorTASDK/shmupmametgm
INLINE speaker_state *get_safe_token(running_device *device)
{
	assert(device != NULL);
	assert(device->token != NULL);
	assert(device->type == SOUND);
	assert(sound_get_type(device) == SOUND_SPEAKER);
	return (speaker_state *)device->token;
}
コード例 #13
0
ファイル: iremga20.c プロジェクト: AltimorTASDK/shmupmametgm
INLINE ga20_state *get_safe_token(running_device *device)
{
	assert(device != NULL);
	assert(device->token != NULL);
	assert(device->type == SOUND);
	assert(sound_get_type(device) == SOUND_IREMGA20);
	return (ga20_state *)device->token;
}
コード例 #14
0
ファイル: st0016.c プロジェクト: nitrologic/emu
INLINE st0016_state *get_safe_token(const device_config *device)
{
	assert(device != NULL);
	assert(device->token != NULL);
	assert(device->type == SOUND);
	assert(sound_get_type(device) == SOUND_ST0016);
	return (st0016_state *)device->token;
}
コード例 #15
0
ファイル: samples.c プロジェクト: Paulodx/sdl-mame-wii
INLINE samples_info *get_safe_token(const device_config *device)
{
	assert(device != NULL);
	assert(device->token != NULL);
	assert(device->type == SOUND);
	assert(sound_get_type(device) == SOUND_SAMPLES);
	return (samples_info *)device->token;
}
コード例 #16
0
ファイル: dac.c プロジェクト: AltimorTASDK/shmupmametgm
INLINE dac_state *get_safe_token(running_device *device)
{
	assert(device != NULL);
	assert(device->token != NULL);
	assert(device->type == SOUND);
	assert(sound_get_type(device) == SOUND_DAC);
	return (dac_state *)device->token;
}
コード例 #17
0
ファイル: tiaintf.c プロジェクト: nitrologic/emu
INLINE tia_state *get_safe_token(const device_config *device)
{
	assert(device != NULL);
	assert(device->token != NULL);
	assert(device->type == SOUND);
	assert(sound_get_type(device) == SOUND_TIA);
	return (tia_state *)device->token;
}
コード例 #18
0
ファイル: info.c プロジェクト: nitrologic/emu
static void print_game_sample(FILE *out, const game_driver *game, const machine_config *config)
{
#if (HAS_SAMPLES)
	const device_config *device;

	/* iterate over sound chips looking for samples */
	for (device = sound_first(config); device != NULL; device = sound_next(device))
		if (sound_get_type(device) == SOUND_SAMPLES)
		{
			const char *const *samplenames = ((const samples_interface *)device->static_config)->samplenames;
			if (samplenames != NULL)
			{
				int sampnum;

				/* iterate over sample names */
				for (sampnum = 0; samplenames[sampnum] != NULL; sampnum++)
				{
					const char *cursampname = samplenames[sampnum];
					int dupnum;

					/* ignore the special '*' samplename */
					if (sampnum == 0 && cursampname[0] == '*')
						continue;

					/* filter out duplicates */
					for (dupnum = 0; dupnum < sampnum; dupnum++)
						if (strcmp(samplenames[dupnum], cursampname) == 0)
							break;
					if (dupnum < sampnum)
						continue;

					/* output the sample name */
					fprintf(out, "\t\t<sample name=\"%s\"/>\n", xml_normalize_string(cursampname));
				}
			}
		}
#endif
}