diff --git a/src/emu/sndintrf.c b/src/emu/sndintrf.c index 465f2a1ec68..a9edededa42 100644 --- a/src/emu/sndintrf.c +++ b/src/emu/sndintrf.c @@ -129,11 +129,11 @@ int sndintrf_init_sound(running_machine *machine, int sndnum, const char *tag, s info->device->clock = clock; /* compute the index */ - totalsnd++; for (index = 0, sndidx = 0; sndidx < totalsnd; sndidx++) - if (sound[sndidx].sndtype == sndtype) + if (sound[sndidx].aliastype == info->aliastype) index++; info->index = index; + totalsnd++; /* start the chip, tagging all its streams */ current_sound_start = &sound[sndnum];