Fixed some bugs and warnings, and cleaned-up and reworked the MIDI input stuff so that MIDI input can go to multiple devices at a time (each device allows configuring, whether or not it should receive MIDI input), and fixed MIDI input on the Sound Blaster 16/AWE32's built-in MPU-401.

This commit is contained in:
OBattler
2020-01-19 05:45:05 +01:00
parent 928010de71
commit 0cb2fa034c
11 changed files with 489 additions and 209 deletions

View File

@@ -8,13 +8,13 @@
*
* Sound emulation core.
*
* Version: @(#)sound.c 1.0.27 2019/02/06
* Version: @(#)sound.c 1.0.28 2020/01/19
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
*
* Copyright 2008-2018 Sarah Walker.
* Copyright 2016-2018 Miran Grca.
* Copyright 2008-2020 Sarah Walker.
* Copyright 2016-2020 Miran Grca.
*/
#include <stdarg.h>
#include <stdint.h>
@@ -441,7 +441,7 @@ sound_reset(void)
sound_realloc_buffers();
midi_device_init();
midi_in_device_init();
midi_in_device_init();
inital();
timer_add(&sound_poll_timer, sound_poll, NULL, 1);
@@ -455,13 +455,20 @@ sound_reset(void)
void
sound_card_reset(void)
{
/* Reset the MPU-401 already loaded flag and the chain of input/output handlers. */
midi_in_handlers_clear();
sound_card_init();
if (mpu401_standalone_enable)
mpu401_device_add();
if (GUS)
device_add(&gus_device);
if (GAMEBLASTER)
device_add(&cms_device);
if (SSI2001)
device_add(&ssi2001_device);
}