diff options
author | 2012-09-03 13:56:17 +0000 | |
---|---|---|
committer | 2012-09-03 13:56:17 +0000 | |
commit | b711b1a007c3a4a75e78eb88f9a6afe4d4180728 (patch) | |
tree | 1498465a0134d7b039fce9271d2b388d218425d4 /src/emu/sound/k051649.c | |
parent | f552908ea962ecdd7e94ea609c84144815b64557 (diff) |
conversion of legacy devices into modern wip (no whatsnew)
Diffstat (limited to 'src/emu/sound/k051649.c')
-rw-r--r-- | src/emu/sound/k051649.c | 51 |
1 files changed, 49 insertions, 2 deletions
diff --git a/src/emu/sound/k051649.c b/src/emu/sound/k051649.c index fd764f4d140..ecc8a882a32 100644 --- a/src/emu/sound/k051649.c +++ b/src/emu/sound/k051649.c @@ -61,7 +61,7 @@ INLINE k051649_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == K051649); - return (k051649_state *)downcast<legacy_device_base *>(device)->token(); + return (k051649_state *)downcast<k051649_device *>(device)->token(); } /* build a table to divide by the number of voices */ @@ -310,4 +310,51 @@ DEVICE_GET_INFO( k051649 ) } -DEFINE_LEGACY_SOUND_DEVICE(K051649, k051649); +const device_type K051649 = &device_creator<k051649_device>; + +k051649_device::k051649_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : device_t(mconfig, K051649, "K051649", tag, owner, clock), + device_sound_interface(mconfig, *this) +{ + m_token = global_alloc_array_clear(UINT8, sizeof(k051649_state)); +} + +//------------------------------------------------- +// device_config_complete - perform any +// operations now that the configuration is +// complete +//------------------------------------------------- + +void k051649_device::device_config_complete() +{ +} + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void k051649_device::device_start() +{ + DEVICE_START_NAME( k051649 )(this); +} + +//------------------------------------------------- +// device_reset - device-specific reset +//------------------------------------------------- + +void k051649_device::device_reset() +{ + DEVICE_RESET_NAME( k051649 )(this); +} + +//------------------------------------------------- +// sound_stream_update - handle a stream update +//------------------------------------------------- + +void k051649_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) +{ + // should never get here + fatalerror("sound_stream_update called; not applicable to legacy sound devices\n"); +} + + |