summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/sound/k051649.c
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2008-12-18 08:32:50 +0000
committer Aaron Giles <aaron@aarongiles.com>2008-12-18 08:32:50 +0000
commit785b6a50c63d106f13f550f006952370bf3b410a (patch)
treef73368741d5dd3d5c1b78f54800eb36541e4bbd8 /src/emu/sound/k051649.c
parentcf9fc5861805c5e344fab6e96d084a372c2683aa (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/k051649.c')
-rw-r--r--src/emu/sound/k051649.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/emu/sound/k051649.c b/src/emu/sound/k051649.c
index fc9a750c600..2a5a7e4240d 100644
--- a/src/emu/sound/k051649.c
+++ b/src/emu/sound/k051649.c
@@ -81,16 +81,16 @@ static int make_mixer_table(struct k051649_info *info, int voices)
/* generate sound to the mix buffer */
-static void k051649_update(void *param, stream_sample_t **inputs, stream_sample_t **_buffer, int length)
+static STREAM_UPDATE( k051649_update )
{
struct k051649_info *info = param;
k051649_sound_channel *voice=info->channel_list;
- stream_sample_t *buffer = _buffer[0];
+ stream_sample_t *buffer = outputs[0];
short *mix;
int i,v,f,j,k;
/* zap the contents of the mixer buffer */
- memset(info->mixer_buffer, 0, length * sizeof(short));
+ memset(info->mixer_buffer, 0, samples * sizeof(short));
for (j=0; j<5; j++) {
v=voice[j].volume;
@@ -105,7 +105,7 @@ static void k051649_update(void *param, stream_sample_t **inputs, stream_sample_
mix = info->mixer_buffer;
/* add our contribution */
- for (i = 0; i < length; i++)
+ for (i = 0; i < samples; i++)
{
int offs;
@@ -123,7 +123,7 @@ static void k051649_update(void *param, stream_sample_t **inputs, stream_sample_
/* mix it down */
mix = info->mixer_buffer;
- for (i = 0; i < length; i++)
+ for (i = 0; i < samples; i++)
*buffer++ = info->mixer_lookup[*mix++];
}