Less dummy devices

This commit is contained in:
Jasmine Iwanek
2024-06-30 22:18:15 -04:00
parent dfe83ac32a
commit 27c8bdd57e
11 changed files with 66 additions and 244 deletions

View File

@@ -71,59 +71,31 @@ typedef struct
const device_t *device;
} MIDI_OUT_DEVICE, MIDI_IN_DEVICE;
static const device_t midi_out_none_device = {
.name = "None",
.internal_name = "none",
.flags = 0,
.local = 0,
.init = NULL,
.close = NULL,
.reset = NULL,
{ .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL
};
static const MIDI_OUT_DEVICE devices[] = {
// clang-format off
{ &midi_out_none_device },
{ &device_none },
#ifdef USE_FLUIDSYNTH
{ &fluidsynth_device },
{ &fluidsynth_device },
#endif
#ifdef USE_MUNT
{ &mt32_old_device },
{ &mt32_new_device },
{ &cm32l_device },
{ &cm32ln_device },
{ &mt32_old_device },
{ &mt32_new_device },
{ &cm32l_device },
{ &cm32ln_device },
#endif
#ifdef USE_RTMIDI
{ &rtmidi_output_device },
{ &rtmidi_output_device },
#endif
#if defined(DEV_BRANCH) && defined(USE_OPL4ML)
{ &opl4_midi_device },
{ &opl4_midi_device },
#endif
{ NULL }
{ NULL }
// clang-format on
};
static const device_t midi_in_none_device = {
.name = "None",
.internal_name = "none",
.flags = 0,
.local = 0,
.init = NULL,
.close = NULL,
.reset = NULL,
{ .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL
};
static const MIDI_IN_DEVICE midi_in_devices[] = {
// clang-format off
{ &midi_in_none_device },
{ &device_none },
#ifdef USE_RTMIDI
{ &rtmidi_input_device },
#endif

View File

@@ -96,38 +96,10 @@ static void *filter_cd_audio_p = NULL;
void (*filter_pc_speaker)(int channel, double *buffer, void *priv) = NULL;
void *filter_pc_speaker_p = NULL;
static const device_t sound_none_device = {
.name = "None",
.internal_name = "none",
.flags = 0,
.local = 0,
.init = NULL,
.close = NULL,
.reset = NULL,
{ .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL
};
static const device_t sound_internal_device = {
.name = "Internal",
.internal_name = "internal",
.flags = 0,
.local = 0,
.init = NULL,
.close = NULL,
.reset = NULL,
{ .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL
};
static const SOUND_CARD sound_cards[] = {
// clang-format off
{ &sound_none_device },
{ &sound_internal_device },
{ &device_none },
{ &device_internal },
{ &acermagic_s20_device },
{ &mirosound_pcm10_device },
{ &adlib_device },