A lot of fixes - everything now seems to work properly.
This commit is contained in:
@@ -68,29 +68,46 @@ uint8_t MIDI_evt_len[256] = {
|
||||
|
||||
typedef struct
|
||||
{
|
||||
const char *internal_name;
|
||||
const device_t *device;
|
||||
} MIDI_DEVICE, MIDI_IN_DEVICE;
|
||||
|
||||
static const device_t midi_none_device = {
|
||||
"None",
|
||||
"none",
|
||||
0, 0,
|
||||
NULL, NULL, NULL,
|
||||
{ NULL }, NULL, NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
static const MIDI_DEVICE devices[] =
|
||||
{
|
||||
{ "none", NULL },
|
||||
{ &midi_none_device },
|
||||
#ifdef USE_FLUIDSYNTH
|
||||
{ "fluidsynth", &fluidsynth_device },
|
||||
{ &fluidsynth_device },
|
||||
#endif
|
||||
#ifdef USE_MUNT
|
||||
{ "mt32", &mt32_device },
|
||||
{ "cm32l", &cm32l_device },
|
||||
{ &mt32_device },
|
||||
{ &cm32l_device },
|
||||
#endif
|
||||
{ SYSTEM_MIDI_INTERNAL_NAME, &rtmidi_device },
|
||||
{ "", NULL }
|
||||
{ &rtmidi_device },
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
static const device_t midi_in_none_device = {
|
||||
"None",
|
||||
"none",
|
||||
0, 0,
|
||||
NULL, NULL, NULL,
|
||||
{ NULL }, NULL, NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
static const MIDI_IN_DEVICE midi_in_devices[] =
|
||||
{
|
||||
{ "none", NULL },
|
||||
{ MIDI_INPUT_INTERNAL_NAME, &rtmidi_input_device },
|
||||
{ "", NULL }
|
||||
{ &midi_in_none_device },
|
||||
{ &rtmidi_input_device },
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
|
||||
@@ -123,7 +140,7 @@ midi_device_has_config(int card)
|
||||
char *
|
||||
midi_device_get_internal_name(int card)
|
||||
{
|
||||
return (char *) devices[card].device->internal_name;
|
||||
return device_get_internal_name(devices[card].device);
|
||||
}
|
||||
|
||||
|
||||
@@ -132,7 +149,7 @@ midi_device_get_from_internal_name(char *s)
|
||||
{
|
||||
int c = 0;
|
||||
|
||||
while (strlen(devices[c].device->internal_name)) {
|
||||
while (devices[c].device != NULL) {
|
||||
if (!strcmp(devices[c].device->internal_name, s))
|
||||
return c;
|
||||
c++;
|
||||
@@ -252,7 +269,7 @@ midi_in_device_has_config(int card)
|
||||
char *
|
||||
midi_in_device_get_internal_name(int card)
|
||||
{
|
||||
return (char *) midi_in_devices[card].device->internal_name;
|
||||
return device_get_internal_name(midi_in_devices[card].device);
|
||||
}
|
||||
|
||||
|
||||
@@ -261,7 +278,7 @@ midi_in_device_get_from_internal_name(char *s)
|
||||
{
|
||||
int c = 0;
|
||||
|
||||
while (strlen(midi_in_devices[c].device->internal_name)) {
|
||||
while (midi_in_devices[c].device != NULL) {
|
||||
if (!strcmp(midi_in_devices[c].device->internal_name, s))
|
||||
return c;
|
||||
c++;
|
||||
|
||||
@@ -264,7 +264,7 @@ static const device_config_t midi_input_config[] =
|
||||
const device_t rtmidi_device =
|
||||
{
|
||||
SYSTEM_MIDI_NAME,
|
||||
"rtmidi",
|
||||
SYSTEM_MIDI_INTERNAL_NAME,
|
||||
0, 0,
|
||||
rtmidi_init,
|
||||
rtmidi_close,
|
||||
@@ -279,7 +279,7 @@ const device_t rtmidi_device =
|
||||
const device_t rtmidi_input_device =
|
||||
{
|
||||
MIDI_INPUT_NAME,
|
||||
"rtmidi_input",
|
||||
MIDI_INPUT_INTERNAL_NAME,
|
||||
0, 0,
|
||||
rtmidi_input_init,
|
||||
rtmidi_input_close,
|
||||
|
||||
@@ -1024,7 +1024,7 @@ static const device_config_t adgold_config[] =
|
||||
const device_t adgold_device =
|
||||
{
|
||||
"AdLib Gold",
|
||||
"adgold",
|
||||
"adlibgold",
|
||||
DEVICE_ISA, 0,
|
||||
adgold_init,
|
||||
adgold_close,
|
||||
|
||||
@@ -2603,7 +2603,7 @@ static const device_config_t sb_awe64_gold_config[] =
|
||||
const device_t sb_1_device =
|
||||
{
|
||||
"Sound Blaster v1.0",
|
||||
"sb_1",
|
||||
"sb",
|
||||
DEVICE_ISA,
|
||||
0,
|
||||
sb_1_init, sb_close, NULL, { NULL },
|
||||
@@ -2615,7 +2615,7 @@ const device_t sb_1_device =
|
||||
const device_t sb_15_device =
|
||||
{
|
||||
"Sound Blaster v1.5",
|
||||
"sb_15",
|
||||
"sb1.5",
|
||||
DEVICE_ISA,
|
||||
0,
|
||||
sb_15_init, sb_close, NULL, { NULL },
|
||||
@@ -2627,7 +2627,7 @@ const device_t sb_15_device =
|
||||
const device_t sb_mcv_device =
|
||||
{
|
||||
"Sound Blaster MCV",
|
||||
"sb_mcv",
|
||||
"sbmcv",
|
||||
DEVICE_MCA,
|
||||
0,
|
||||
sb_mcv_init, sb_close, NULL, { NULL },
|
||||
@@ -2639,7 +2639,7 @@ const device_t sb_mcv_device =
|
||||
const device_t sb_2_device =
|
||||
{
|
||||
"Sound Blaster v2.0",
|
||||
"sb_2",
|
||||
"sb2.0",
|
||||
DEVICE_ISA,
|
||||
0,
|
||||
sb_2_init, sb_close, NULL, { NULL },
|
||||
@@ -2651,7 +2651,7 @@ const device_t sb_2_device =
|
||||
const device_t sb_pro_v1_device =
|
||||
{
|
||||
"Sound Blaster Pro v1",
|
||||
"sb_pro_v1",
|
||||
"sbprov1",
|
||||
DEVICE_ISA,
|
||||
0,
|
||||
sb_pro_v1_init, sb_close, NULL, { NULL },
|
||||
@@ -2663,7 +2663,7 @@ const device_t sb_pro_v1_device =
|
||||
const device_t sb_pro_v2_device =
|
||||
{
|
||||
"Sound Blaster Pro v2",
|
||||
"sb_pro_v2",
|
||||
"sbprov2",
|
||||
DEVICE_ISA,
|
||||
0,
|
||||
sb_pro_v2_init, sb_close, NULL, { NULL },
|
||||
@@ -2675,7 +2675,7 @@ const device_t sb_pro_v2_device =
|
||||
const device_t sb_pro_mcv_device =
|
||||
{
|
||||
"Sound Blaster Pro MCV",
|
||||
"sb_pro_mcv",
|
||||
"sbpromcv",
|
||||
DEVICE_MCA,
|
||||
0,
|
||||
sb_pro_mcv_init, sb_close, NULL, { NULL },
|
||||
@@ -2687,7 +2687,7 @@ const device_t sb_pro_mcv_device =
|
||||
const device_t sb_pro_compat_device =
|
||||
{
|
||||
"Sound Blaster Pro (Compatibility)",
|
||||
"sb_pro_compat",
|
||||
"sbpro_compat",
|
||||
DEVICE_ISA | DEVICE_AT,
|
||||
0,
|
||||
sb_pro_compat_init, sb_close, NULL, { NULL },
|
||||
@@ -2699,7 +2699,7 @@ const device_t sb_pro_compat_device =
|
||||
const device_t sb_16_device =
|
||||
{
|
||||
"Sound Blaster 16",
|
||||
"sb_16",
|
||||
"sb16",
|
||||
DEVICE_ISA | DEVICE_AT,
|
||||
0,
|
||||
sb_16_init, sb_close, NULL, { NULL },
|
||||
@@ -2711,7 +2711,7 @@ const device_t sb_16_device =
|
||||
const device_t sb_16_pnp_device =
|
||||
{
|
||||
"Sound Blaster 16 PnP",
|
||||
"sb_16_pnp",
|
||||
"sb16_pnp",
|
||||
DEVICE_ISA | DEVICE_AT,
|
||||
0,
|
||||
sb_16_pnp_init, sb_close, NULL, { NULL },
|
||||
@@ -2723,7 +2723,7 @@ const device_t sb_16_pnp_device =
|
||||
const device_t sb_32_pnp_device =
|
||||
{
|
||||
"Sound Blaster 32 PnP",
|
||||
"sb_32_pnp",
|
||||
"sb32_pnp",
|
||||
DEVICE_ISA | DEVICE_AT,
|
||||
0,
|
||||
sb_awe32_pnp_init, sb_awe32_close, NULL,
|
||||
@@ -2737,7 +2737,7 @@ const device_t sb_32_pnp_device =
|
||||
const device_t sb_awe32_device =
|
||||
{
|
||||
"Sound Blaster AWE32",
|
||||
"sb_awe32",
|
||||
"sbawe32",
|
||||
DEVICE_ISA | DEVICE_AT,
|
||||
0,
|
||||
sb_awe32_init, sb_awe32_close, NULL,
|
||||
@@ -2750,7 +2750,7 @@ const device_t sb_awe32_device =
|
||||
const device_t sb_awe32_pnp_device =
|
||||
{
|
||||
"Sound Blaster AWE32 PnP",
|
||||
"sb_awe32_pnp",
|
||||
"sbawe32_pnp",
|
||||
DEVICE_ISA | DEVICE_AT,
|
||||
1,
|
||||
sb_awe32_pnp_init, sb_awe32_close, NULL,
|
||||
@@ -2763,7 +2763,7 @@ const device_t sb_awe32_pnp_device =
|
||||
const device_t sb_awe64_gold_device =
|
||||
{
|
||||
"Sound Blaster AWE64 Gold",
|
||||
"sb_awe64_gold",
|
||||
"sbawe64_gold",
|
||||
DEVICE_ISA | DEVICE_AT,
|
||||
2,
|
||||
sb_awe32_pnp_init, sb_awe32_close, NULL,
|
||||
|
||||
@@ -256,7 +256,7 @@ const device_t wss_device =
|
||||
const device_t ncr_business_audio_device =
|
||||
{
|
||||
"NCR Business Audio",
|
||||
"ncr_business_audio",
|
||||
"ncraudio",
|
||||
DEVICE_MCA, 0,
|
||||
ncr_audio_init, wss_close, NULL,
|
||||
{ NULL },
|
||||
|
||||
@@ -82,15 +82,15 @@ static void *filter_cd_audio_p = NULL;
|
||||
|
||||
static const device_t sound_none_device = {
|
||||
"None",
|
||||
"sound_none",
|
||||
"none",
|
||||
0, 0,
|
||||
NULL, NULL, NULL,
|
||||
{ NULL }, NULL, NULL,
|
||||
NULL
|
||||
};
|
||||
static const device_t sound_internal_device = {
|
||||
"Internal Sound Card",
|
||||
"sound_internal",
|
||||
"Internal",
|
||||
"internal",
|
||||
0, 0,
|
||||
NULL, NULL, NULL,
|
||||
{ NULL }, NULL, NULL,
|
||||
@@ -100,30 +100,30 @@ static const device_t sound_internal_device = {
|
||||
|
||||
static const SOUND_CARD sound_cards[] =
|
||||
{
|
||||
{ &sound_none_device },
|
||||
{ &sound_internal_device },
|
||||
{ &sound_none_device },
|
||||
{ &sound_internal_device },
|
||||
{ &adlib_device },
|
||||
{ &adgold_device },
|
||||
{ &azt2316a_device },
|
||||
{ &azt2316a_device },
|
||||
{ &azt1605_device },
|
||||
{ &cs4236b_device },
|
||||
{ &sb_1_device },
|
||||
{ &sb_15_device },
|
||||
{ &sb_2_device },
|
||||
{ &sb_pro_v1_device },
|
||||
{ &sb_pro_v2_device },
|
||||
{ &sb_pro_v1_device },
|
||||
{ &sb_pro_v2_device },
|
||||
{ &sb_16_device },
|
||||
{ &sb_16_pnp_device },
|
||||
{ &sb_32_pnp_device },
|
||||
{ &sb_awe32_device },
|
||||
{ &sb_16_pnp_device },
|
||||
{ &sb_32_pnp_device },
|
||||
{ &sb_awe32_device },
|
||||
{ &sb_awe32_pnp_device },
|
||||
{ &sb_awe64_gold_device },
|
||||
#if defined(DEV_BRANCH) && defined(USE_PAS16)
|
||||
{ &pas16_device },
|
||||
#endif
|
||||
{ &pssj_isa_device },
|
||||
{ &pssj_isa_device },
|
||||
{ &wss_device },
|
||||
{ &adlib_mca_device },
|
||||
{ &adlib_mca_device },
|
||||
{ &ncr_business_audio_device },
|
||||
{ &sb_mcv_device },
|
||||
{ &sb_pro_mcv_device },
|
||||
@@ -183,7 +183,7 @@ sound_card_has_config(int card)
|
||||
char *
|
||||
sound_card_get_internal_name(int card)
|
||||
{
|
||||
return (char *) sound_cards[card].device->internal_name;
|
||||
return device_get_internal_name(sound_cards[card].device);
|
||||
}
|
||||
|
||||
|
||||
@@ -192,7 +192,7 @@ sound_card_get_from_internal_name(char *s)
|
||||
{
|
||||
int c = 0;
|
||||
|
||||
while (strlen((char *) sound_cards[c].device->internal_name)) {
|
||||
while (sound_cards[c].device != NULL) {
|
||||
if (!strcmp((char *) sound_cards[c].device->internal_name, s))
|
||||
return c;
|
||||
c++;
|
||||
|
||||
Reference in New Issue
Block a user