Onboard audio device support + onboard ES1371 for Tsunami ATX

This commit is contained in:
RichardG867
2020-05-19 21:15:25 -03:00
parent f236a44b08
commit 92616e7b1d
9 changed files with 84 additions and 33 deletions

View File

@@ -29,6 +29,7 @@
#include <86box/cdrom.h>
#include <86box/hdc_ide.h>
#include <86box/plat.h>
#include <86box/machine.h>
#include <86box/sound.h>
#include <86box/midi.h>
#include <86box/snd_opl.h>
@@ -79,6 +80,7 @@ static int cd_thread_enable = 0;
static const SOUND_CARD sound_cards[] =
{
{ "None", "none", NULL },
{ "Internal", "internal", NULL },
{ "[ISA] Adlib", "adlib", &adlib_device },
{ "[ISA] Adlib Gold", "adlibgold", &adgold_device },
{ "[ISA] Aztech Sound Galaxy Pro 16 AB (Washington)", "azt2316a", &azt2316a_device },
@@ -126,6 +128,9 @@ sound_log(const char *fmt, ...)
int
sound_card_available(int card)
{
if ((card == SOUND_INTERNAL) && !(machines[machine].flags & MACHINE_SOUND))
return 0;
if (sound_cards[card].device)
return device_available(sound_cards[card].device);
@@ -181,7 +186,7 @@ sound_card_get_from_internal_name(char *s)
void
sound_card_init(void)
{
if (sound_cards[sound_card_current].device)
if ((sound_card_current != SOUND_INTERNAL) && (sound_cards[sound_card_current].device)) /* skip internal sound card */
device_add(sound_cards[sound_card_current].device);
}