Merge pull request #2134 from tlindner/ay8910-change-frequency

Allow clock frequency changes in ay8910.
This commit is contained in:
R. Belmont 2017-03-14 20:15:16 -04:00 committed by GitHub
commit a2eba412e3
2 changed files with 6 additions and 0 deletions

View File

@ -991,6 +991,11 @@ void ay8910_device::ay_set_clock(int clock)
m_channel->set_sample_rate( clock / 8 );
}
void ay8910_device::device_clock_changed()
{
ay_set_clock(clock());
}
void ay8910_device::ay8910_write_ym(int addr, uint8_t data)
{
if (addr & 1)

View File

@ -156,6 +156,7 @@ protected:
// device-level overrides
virtual void device_start() override;
virtual void device_reset() override;
virtual void device_clock_changed() override;
// sound stream update overrides
virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) override;