static DEVICE_START( common_sh_start ) { int sample_rate = SH8253_CLOCK; sh6840_clocks_per_sample = (int)((double)SH6840_CLOCK / (double)sample_rate * (double)(1 << 24)); /* allocate the stream */ exidy_stream = stream_create(device, 0, 1, sample_rate, NULL, exidy_stream_update); sh6840_register_state_globals(device->machine); }
void exidy_sound_device::common_sh_start() { int sample_rate = SH8253_CLOCK.value(); m_sh6840_clocks_per_sample = (int)(SH6840_CLOCK.dvalue() / (double)sample_rate * (double)(1 << 24)); /* allocate the stream */ m_stream = machine().sound().stream_alloc(*this, 0, 1, sample_rate); sh6840_register_state_globals(); }
static DEVICE_START( common_sh_start ) { exidy_sound_state *state = get_safe_token(device); int sample_rate = SH8253_CLOCK; state->m_sh6840_clocks_per_sample = (int)((double)SH6840_CLOCK / (double)sample_rate * (double)(1 << 24)); /* allocate the stream */ state->m_stream = device->machine().sound().stream_alloc(*device, 0, 1, sample_rate, NULL, exidy_stream_update); state->m_maincpu = device->machine().device<cpu_device>("maincpu"); sh6840_register_state_globals(device); }