diff options
author | 2008-12-18 08:32:50 +0000 | |
---|---|---|
committer | 2008-12-18 08:32:50 +0000 | |
commit | 785b6a50c63d106f13f550f006952370bf3b410a (patch) | |
tree | f73368741d5dd3d5c1b78f54800eb36541e4bbd8 /src/emu/sound/multipcm.c | |
parent | cf9fc5861805c5e344fab6e96d084a372c2683aa (diff) |
From: Atari Ace [mailto:atari_ace@verizon.net]
Sent: Wednesday, December 17, 2008 9:03 PM
To: submit@mamedev.org
Cc: atariace@hotmail.com
Subject: [patch] STREAM_UPDATE update
Hi mamedev,
This patch modifies the parameters of the stream_update_func callback.
The first two patches go through and changes all the callbacks to use
a consistent set of parameters (the larger patch was mechanically
generated, the smaller second patch are hand edits where review or
compilation showed issues with the automatic conversion). The third
patch then macroizes all the callbacks to STREAM_UPDATE, and was done
mechanically except for the change to streams.h. The fourth patch
then adds device to the callback, and eliminates Machine in a handful
of callbacks by referencing the device. deprecat.h -= 8.
~aa
Diffstat (limited to 'src/emu/sound/multipcm.c')
-rw-r--r-- | src/emu/sound/multipcm.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/emu/sound/multipcm.c b/src/emu/sound/multipcm.c index 7ce6bbf9432..cfa23cf974a 100644 --- a/src/emu/sound/multipcm.c +++ b/src/emu/sound/multipcm.c @@ -413,20 +413,20 @@ static void WriteSlot(struct _MultiPCM *ptChip,struct _SLOT *slot,int reg,unsign } } -static void MultiPCM_update(void *param, stream_sample_t **inputs, stream_sample_t **buffer, int length ) +static STREAM_UPDATE( MultiPCM_update ) { struct _MultiPCM *ptChip = param; stream_sample_t *datap[2]; int i,sl; - datap[0] = buffer[0]; - datap[1] = buffer[1]; + datap[0] = outputs[0]; + datap[1] = outputs[1]; - memset(datap[0], 0, sizeof(*datap[0])*length); - memset(datap[1], 0, sizeof(*datap[1])*length); + memset(datap[0], 0, sizeof(*datap[0])*samples); + memset(datap[1], 0, sizeof(*datap[1])*samples); - for(i=0;i<length;++i) + for(i=0;i<samples;++i) { signed int smpl=0; signed int smpr=0; |