Onboard audio device support + onboard ES1371 for Tsunami ATX
This commit is contained in:
@@ -1313,7 +1313,7 @@ static void *es1371_init(const device_t *info)
|
||||
|
||||
sound_add_handler(es1371_get_buffer, es1371);
|
||||
|
||||
es1371->card = pci_add_card(PCI_ADD_NORMAL, es1371_pci_read, es1371_pci_write, es1371);
|
||||
es1371->card = pci_add_card(info->local ? PCI_ADD_SOUND : PCI_ADD_NORMAL, es1371_pci_read, es1371_pci_write, es1371);
|
||||
|
||||
timer_add(&es1371->dac[1].timer, es1371_poll, es1371, 1);
|
||||
|
||||
@@ -1382,14 +1382,28 @@ void es1371_add_status_info_dac(es1371_t *es1371, char *s, int max_len, int dac_
|
||||
|
||||
const device_t es1371_device =
|
||||
{
|
||||
"Ensoniq AudioPCI (ES1371)",
|
||||
DEVICE_PCI,
|
||||
0,
|
||||
es1371_init,
|
||||
es1371_close,
|
||||
NULL,
|
||||
NULL,
|
||||
es1371_speed_changed,
|
||||
NULL,
|
||||
NULL
|
||||
"Ensoniq AudioPCI (ES1371)",
|
||||
DEVICE_PCI,
|
||||
0,
|
||||
es1371_init,
|
||||
es1371_close,
|
||||
NULL,
|
||||
NULL,
|
||||
es1371_speed_changed,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
const device_t es1371_onboard_device =
|
||||
{
|
||||
"Ensoniq AudioPCI (ES1371) (On-Board)",
|
||||
DEVICE_PCI,
|
||||
1,
|
||||
es1371_init,
|
||||
es1371_close,
|
||||
NULL,
|
||||
NULL,
|
||||
es1371_speed_changed,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user