summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/sound/tms36xx.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/emu/sound/tms36xx.c')
-rw-r--r--src/emu/sound/tms36xx.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/emu/sound/tms36xx.c b/src/emu/sound/tms36xx.c
index 936c7ee1152..78d46b4bf4a 100644
--- a/src/emu/sound/tms36xx.c
+++ b/src/emu/sound/tms36xx.c
@@ -488,12 +488,9 @@ void tms3617_enable_w(int chip, int enable)
static SND_START( tms36xx )
{
int j;
- struct TMS36XX *tms;
+ struct TMS36XX *tms = device->token;
int enable;
- tms = auto_malloc(sizeof(*tms));
- memset(tms, 0, sizeof(*tms));
-
tms->intf = device->static_config;
tms->channel = stream_create(device, 0, 1, clock * 64, tms, tms36xx_sound_update);
@@ -518,7 +515,7 @@ static SND_START( tms36xx )
tms->decay[3], tms->decay[4], tms->decay[5]));
LOG(("TMS36xx speed %d\n", tms->speed));
- return tms;
+ return DEVICE_START_OK;
}
@@ -542,6 +539,7 @@ SND_GET_INFO( tms36xx )
switch (state)
{
/* --- the following bits of info are returned as 64-bit signed integers --- */
+ case SNDINFO_INT_TOKEN_BYTES: info->i = sizeof(struct TMS36XX); break;
/* --- the following bits of info are returned as pointers to data or functions --- */
case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( tms36xx ); break;