Exemple #1
0
void laserdisc_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
{
	switch (id)
	{
		case TID_VBI_FETCH:
		{
			// wait for previous read and decode to finish
			process_track_data();

			// update current track based on slider speed
			update_slider_pos();

			// update the state
			add_and_clamp_track(player_update(m_metadata[m_fieldnum], m_fieldnum, machine().time()));

			// flush any audio before we read more
			m_stream->update();

			// start reading the track data for the next round
			m_fieldnum ^= 1;
			read_track_data();
			break;
		}
	}
}
Exemple #2
0
int read_data (databuf_t* db, int pos) {
    short msg_type = 0;
    pos = race_read_short(db,pos, &msg_type);

    switch (msg_type) {
        case TRACK_MSG:
          return read_track_data(db,pos);
        case PROXIMITY_MSG:
          return read_proximity_data(db,pos);
        default: 
          printf("received unknown data message of type: %d\n", msg_type);
          return 0;
    }
}