diff options
author | 2009-01-18 20:24:42 +0000 | |
---|---|---|
committer | 2009-01-18 20:24:42 +0000 | |
commit | 170b4c27522f3ed0c3af90e0e24e45659f0ea763 (patch) | |
tree | ebf0563c6f0a9f8b48040beec2543e5b5fd086fa /src/emu/sound/multipcm.c | |
parent | 6278021cf6a3a3e6af895ff4ea3623175fd4ef71 (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/multipcm.c')
-rw-r--r-- | src/emu/sound/multipcm.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/emu/sound/multipcm.c b/src/emu/sound/multipcm.c index 55255981199..9cc0cdd8d3c 100644 --- a/src/emu/sound/multipcm.c +++ b/src/emu/sound/multipcm.c @@ -488,11 +488,9 @@ static unsigned char multi_pcm_reg_r(int chip, int offset) static SND_START( multipcm ) { - struct _MultiPCM *ptChip; + struct _MultiPCM *ptChip = device->token; int i; - ptChip=(struct _MultiPCM *)auto_malloc(sizeof(struct _MultiPCM)); - ptChip->ROM=(INT8 *)device->region; ptChip->Rate=(float) clock / MULTIPCM_CLOCKDIV; @@ -636,7 +634,7 @@ static SND_START( multipcm ) LFO_Init(); - return ptChip; + return DEVICE_START_OK; } @@ -707,6 +705,7 @@ SND_GET_INFO( multipcm ) switch (state) { /* --- the following bits of info are returned as 64-bit signed integers --- */ + case SNDINFO_INT_TOKEN_BYTES: info->i = sizeof(struct _MultiPCM); 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( multipcm ); break; |