tms5110: Implement device_clock_changed (nw)

This commit is contained in:
AJR 2017-06-26 22:35:29 -04:00
parent eaa9601501
commit b6e896dab9
2 changed files with 3 additions and 6 deletions

View File

@ -1249,14 +1249,12 @@ void tms5110_device::sound_stream_update(sound_stream &stream, stream_sample_t *
/******************************************************************************
tms5110_set_frequency -- adjusts the playback frequency
TODO: kill this function; we should be adjusting the tms51xx device clock itself,
not setting it here!
******************************************************************************/
void tms5110_device::set_frequency(int frequency)
void tms5110_device::device_clock_changed()
{
m_stream->set_sample_rate(frequency / 80);
m_stream->set_sample_rate(clock() / 80);
}

View File

@ -65,14 +65,13 @@ public:
// it is not related at all to the speech generation and conflicts with the new ROM controller interface.
DECLARE_READ_LINE_MEMBER( romclk_hack_r );
void set_frequency(int frequency);
protected:
tms5110_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int variant);
// device-level overrides
virtual void device_start() override;
virtual void device_reset() override;
virtual void device_clock_changed() override;
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;