summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/sound/cdda.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/emu/sound/cdda.c')
-rw-r--r--src/emu/sound/cdda.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/emu/sound/cdda.c b/src/emu/sound/cdda.c
index 0bab6475fcb..f9b94b1e99b 100644
--- a/src/emu/sound/cdda.c
+++ b/src/emu/sound/cdda.c
@@ -46,10 +46,7 @@ static STREAM_UPDATE( cdda_update )
static SND_START( cdda )
{
const struct CDDAinterface *intf;
- cdda_info *info;
-
- info = auto_malloc(sizeof(*info));
- memset(info, 0, sizeof(*info));
+ cdda_info *info = device->token;
/* allocate an audio cache */
info->audio_cache = auto_malloc( CD_MAX_SECTOR_DATA * MAX_SECTORS );
@@ -67,7 +64,7 @@ static SND_START( cdda )
state_save_register_device_item( device, 0, info->audio_samples );
state_save_register_device_item( device, 0, info->audio_bptr );
- return info;
+ return DEVICE_START_OK;
}
@@ -315,6 +312,7 @@ SND_GET_INFO( cdda )
switch (state)
{
/* --- the following bits of info are returned as 64-bit signed integers --- */
+ case SNDINFO_INT_TOKEN_BYTES: info->i = sizeof(cdda_info); 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( cdda ); break;