summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/audio/flower.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/audio/flower.c')
-rw-r--r--src/mame/audio/flower.c23
1 files changed, 16 insertions, 7 deletions
diff --git a/src/mame/audio/flower.c b/src/mame/audio/flower.c
index 604b4186a29..d699ae3d4d8 100644
--- a/src/mame/audio/flower.c
+++ b/src/mame/audio/flower.c
@@ -52,7 +52,7 @@ static short *mixer_buffer_2;
/* build a table to divide by the number of voices; gain is specified as gain*16 */
-static int make_mixer_table(int voices, int gain)
+static void make_mixer_table(int voices, int gain)
{
int count = voices * 128;
int i;
@@ -71,8 +71,6 @@ static int make_mixer_table(int voices, int gain)
mixer_lookup[ i] = val;
mixer_lookup[-i] = -val;
}
-
- return 0;
}
@@ -154,7 +152,7 @@ static STREAM_UPDATE( flower_update_mono )
-CUSTOM_START( flower_sh_start )
+static DEVICE_START( flower_sound )
{
running_machine *machine = device->machine;
sound_channel *voice;
@@ -168,8 +166,7 @@ CUSTOM_START( flower_sh_start )
mixer_buffer_2 = mixer_buffer + samplerate;
/* build the mixer table */
- if (make_mixer_table(8, defgain))
- return NULL;
+ make_mixer_table(8, defgain);
/* extract globals from the interface */
num_voices = 8;
@@ -202,8 +199,20 @@ CUSTOM_START( flower_sh_start )
state_save_register_item(machine, "flower_custom", NULL, i+1, voice->oneshotplaying);
state_save_register_item(machine, "flower_custom", NULL, i+1, voice->rom_offset);
}
+}
- return auto_malloc(1);
+
+DEVICE_GET_INFO( flower_sound )
+{
+ switch (state)
+ {
+ /* --- the following bits of info are returned as pointers to data or functions --- */
+ case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(flower_sound); break;
+
+ /* --- the following bits of info are returned as NULL-terminated strings --- */
+ case DEVINFO_STR_NAME: strcpy(info->s, "Flower Custom"); break;
+ case DEVINFO_STR_SOURCE_FILE: strcpy(info->s, __FILE__); break;
+ }
}