コード例 #1
0
ファイル: laserdsc.c プロジェクト: jiangzhonghui/mame
void laserdisc_device::device_start()
{
	// initialize the various pieces
	init_disc();
	init_video();
	init_audio();

	// register callbacks
	config_register(machine(), "laserdisc", config_saveload_delegate(FUNC(laserdisc_device::config_load), this), config_saveload_delegate(FUNC(laserdisc_device::config_save), this));
}
コード例 #2
0
ファイル: laserdsc.cpp プロジェクト: DragonMinded/mame
void laserdisc_device::device_start()
{
	// if we have a palette and it's not started, wait for it
	if (m_overlay_palette != nullptr && !m_overlay_palette->started())
		throw device_missing_dependencies();

	// initialize the various pieces
	init_disc();
	init_video();
	init_audio();

	// register callbacks
	machine().configuration().config_register("laserdisc", config_saveload_delegate(FUNC(laserdisc_device::config_load), this), config_saveload_delegate(FUNC(laserdisc_device::config_save), this));
}
コード例 #3
0
ファイル: laserdsc.c プロジェクト: CJBass/mame2013-libretro
void laserdisc_device::device_start()
{
	// ensure that our screen is started first
	m_screen = machine().device<screen_device>(m_screen_name);
	assert(m_screen != NULL);
	if (!m_screen->started())
		throw device_missing_dependencies();

	// initialize the various pieces
	init_disc();
	init_video();
	init_audio();

	// register callbacks
	config_register(machine(), "laserdisc", config_saveload_delegate(FUNC(laserdisc_device::config_load), this), config_saveload_delegate(FUNC(laserdisc_device::config_save), this));
}
コード例 #4
0
ファイル: query_freedb.c プロジェクト: 130610/ktwh-metadata
int main(int argc, char *argv[]) {
	/*initialize the connection to the freedb server */
	cddb_conn_t *conn = NULL;
	cddb_disc_t *disc;
	cddb_track_t *track;
	conn = init_conn();

	/* set track info */
	if (argc != 4) {
		fprintf(stderr, "usage: cddb_query <discid> <category> <track number>\n");
		return -1;
	}
	char *p;
	unsigned long discid = strtoul(argv[1], &p, 16);
	char *cat = argv[2];
	lowercase(cat);
	int tracknum = atoi(argv[3]);

	/* initialize the disc */
	disc = init_disc();
	cddb_disc_set_discid(disc, discid);
	cddb_disc_set_category_str(disc, cat);

	/* query the database to populate the disc info */
	read_db(conn, disc);

	/* extract the track from the disc */
	track = cddb_disc_get_track(disc, tracknum - 1);

	/* format an output track info */
	const char *title = cddb_track_get_title(track);
	const char *artist = cddb_disc_get_artist(disc);
	const char *album = cddb_disc_get_title(disc);
	unsigned int date = cddb_disc_get_year(disc);
	const char *label = "";
	const char *genre = cddb_disc_get_genre(disc);
	printf("%s\t%s\t%s\t%d\t%s\t%s\t", title, artist, album, date, label, genre);

	return 0;
}