Applied the recent mainline PCem commits (and fixed the Pentium machines);
Ported the Roland MT-32 emulation (using MUNT) from bit's MT32 emulation branch of PCem; Sanitized the OpenAL give buffer code in openal.c a bit; NVR path is now specifiable in the Settings dialog; Added Logitech 3-button serial mouse per protocol description by waltje; The RTL8029AS and the BT-958D now actually use the PCI IRQ routing; Fixed BT-958D PCI device initialization on the bus; PCI IRQ routing now respects the edge/level setting set on ports 4D0/4D1.
This commit is contained in:
62
src/SOUND/midi_system.c
Normal file
62
src/SOUND/midi_system.c
Normal file
@@ -0,0 +1,62 @@
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "../device.h"
|
||||
#include "../WIN/plat_midi.h"
|
||||
#include "midi_system.h"
|
||||
#include "midi.h"
|
||||
|
||||
void* system_midi_init()
|
||||
{
|
||||
midi_device_t* dev = malloc(sizeof(midi_device_t));
|
||||
memset(dev, 0, sizeof(midi_device_t));
|
||||
|
||||
dev->play_msg = plat_midi_play_msg;
|
||||
dev->play_sysex = plat_midi_play_sysex;
|
||||
dev->write = plat_midi_write;
|
||||
|
||||
plat_midi_init();
|
||||
|
||||
midi_init(dev);
|
||||
|
||||
return dev;
|
||||
}
|
||||
|
||||
void system_midi_close(void* p)
|
||||
{
|
||||
plat_midi_close();
|
||||
|
||||
midi_close();
|
||||
}
|
||||
|
||||
int system_midi_available()
|
||||
{
|
||||
return plat_midi_get_num_devs();
|
||||
}
|
||||
|
||||
static device_config_t system_midi_config[] =
|
||||
{
|
||||
{
|
||||
.name = "midi",
|
||||
.description = "MIDI out device",
|
||||
.type = CONFIG_MIDI,
|
||||
.default_int = 0
|
||||
},
|
||||
{
|
||||
.type = -1
|
||||
}
|
||||
};
|
||||
|
||||
device_t system_midi_device =
|
||||
{
|
||||
SYSTEM_MIDI_NAME,
|
||||
0,
|
||||
system_midi_init,
|
||||
system_midi_close,
|
||||
system_midi_available,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
system_midi_config
|
||||
};
|
||||
Reference in New Issue
Block a user