summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/sound/nile.c
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2009-01-18 20:24:42 +0000
committer Aaron Giles <aaron@aarongiles.com>2009-01-18 20:24:42 +0000
commit170b4c27522f3ed0c3af90e0e24e45659f0ea763 (patch)
treeebf0563c6f0a9f8b48040beec2543e5b5fd086fa /src/emu/sound/nile.c
parent6278021cf6a3a3e6af895ff4ea3623175fd4ef71 (diff)
Sound cores no longer allocate their own tokens. Instead they return a new
integer value indicating the size of token they want, and the core allocates it for them. This mirrors the standard device behavior.
Diffstat (limited to 'src/emu/sound/nile.c')
-rw-r--r--src/emu/sound/nile.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/emu/sound/nile.c b/src/emu/sound/nile.c
index 188b9d4bf2b..459b85fe5e9 100644
--- a/src/emu/sound/nile.c
+++ b/src/emu/sound/nile.c
@@ -218,16 +218,13 @@ static STREAM_UPDATE( nile_update )
static SND_START( nile )
{
- struct nile_info *info;
-
- info = auto_malloc(sizeof(*info));
- memset(info, 0, sizeof(*info));
+ struct nile_info *info = device->token;
info->sound_ram = device->region;
info->stream = stream_create(device, 0, 2, 44100, info, nile_update);
- return info;
+ return DEVICE_START_OK;
}
@@ -250,6 +247,7 @@ SND_GET_INFO( nile )
switch (state)
{
/* --- the following bits of info are returned as 64-bit signed integers --- */
+ case SNDINFO_INT_TOKEN_BYTES: info->i = sizeof(struct nile_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( nile ); break;