Support up to 4 sound cards

This commit is contained in:
Jasmine Iwanek
2023-02-01 02:31:07 -05:00
parent f74b72d332
commit 5f04b29e8f
56 changed files with 892 additions and 716 deletions

View File

@@ -114,9 +114,6 @@ extern int bugger_enabled, /* (C) enable ISAbugger */
isamem_type[], /* (C) enable ISA mem cards */
isartc_type; /* (C) enable ISA RTC card */
extern int sound_is_float, /* (C) sound uses FP values */
GAMEBLASTER, /* (C) sound option */
GUS, GUSMAX, /* (C) sound option */
SSI2001, /* (C) sound option */
voodoo_enabled, /* (C) video option */
ibm8514_enabled, /* (C) video option */
xga_enabled; /* (C) video option */

View File

@@ -79,82 +79,85 @@
#define IDT_JOYSTICK 1718 /* Joystick: */
/* DLG_CFG_SOUND */
#define IDT_SOUND 1719 /* Sound card: */
#define IDT_MIDI_OUT 1720 /* MIDI Out Device: */
#define IDT_MIDI_IN 1721 /* MIDI In Device: */
#define IDT_SOUND1 1719 /* Sound card 1: */
#define IDT_SOUND2 1720 /* Sound card 2: */
#define IDT_SOUND3 1721 /* Sound card 3: */
#define IDT_SOUND4 1722 /* Sound card 4: */
#define IDT_MIDI_OUT 1723 /* MIDI Out Device: */
#define IDT_MIDI_IN 1724 /* MIDI In Device: */
/* DLG_CFG_NETWORK */
#define IDT_NET_TYPE 1722 /* Network type: */
#define IDT_PCAP 1723 /* PCap device: */
#define IDT_NET 1724 /* Network adapter: */
#define IDT_NET_TYPE 1725 /* Network type: */
#define IDT_PCAP 1726 /* PCap device: */
#define IDT_NET 1727 /* Network adapter: */
/* DLG_CFG_PORTS */
#define IDT_COM1 1725 /* COM1 Device: */
#define IDT_COM2 1726 /* COM1 Device: */
#define IDT_COM3 1727 /* COM1 Device: */
#define IDT_COM4 1728 /* COM1 Device: */
#define IDT_COM1 1728 /* COM1 Device: */
#define IDT_COM2 1729 /* COM1 Device: */
#define IDT_COM3 1730 /* COM1 Device: */
#define IDT_COM4 1731 /* COM1 Device: */
#define IDT_LPT1 1729 /* LPT1 Device: */
#define IDT_LPT2 1730 /* LPT2 Device: */
#define IDT_LPT3 1731 /* LPT3 Device: */
#define IDT_LPT4 1732 /* LPT4 Device: */
#define IDT_LPT1 1732 /* LPT1 Device: */
#define IDT_LPT2 1733 /* LPT2 Device: */
#define IDT_LPT3 1734 /* LPT3 Device: */
#define IDT_LPT4 1735 /* LPT4 Device: */
/* DLG_CFG_STORAGE */
#define IDT_HDC 1733 /* HD Controller: */
#define IDT_FDC 1734 /* Ext FD Controller: */
#define IDT_SCSI_1 1735 /* SCSI Board #1: */
#define IDT_SCSI_2 1736 /* SCSI Board #2: */
#define IDT_SCSI_3 1737 /* SCSI Board #3: */
#define IDT_SCSI_4 1738 /* SCSI Board #4: */
#define IDT_HDC 1736 /* HD Controller: */
#define IDT_FDC 1737 /* Ext FD Controller: */
#define IDT_SCSI_1 1738 /* SCSI Board #1: */
#define IDT_SCSI_2 1739 /* SCSI Board #2: */
#define IDT_SCSI_3 1740 /* SCSI Board #3: */
#define IDT_SCSI_4 1742 /* SCSI Board #4: */
/* DLG_CFG_HARD_DISKS */
#define IDT_HDD 1739 /* Hard disks: */
#define IDT_BUS 1740 /* Bus: */
#define IDT_CHANNEL 1741 /* Channel: */
#define IDT_ID 1742 /* ID: */
#define IDT_LUN 1743 /* LUN: */
#define IDT_SPEED 1744 /* Speed: */
#define IDT_HDD 1743 /* Hard disks: */
#define IDT_BUS 1744 /* Bus: */
#define IDT_CHANNEL 1745 /* Channel: */
#define IDT_ID 1746 /* ID: */
#define IDT_LUN 1747 /* LUN: */
#define IDT_SPEED 1748 /* Speed: */
/* DLG_CFG_HARD_DISKS_ADD */
#define IDT_SECTORS 1745 /* Sectors: */
#define IDT_HEADS 1746 /* Heads: */
#define IDT_CYLS 1747 /* Cylinders: */
#define IDT_SIZE_MB 1748 /* Size (MB): */
#define IDT_TYPE 1749 /* Type: */
#define IDT_FILE_NAME 1750 /* File name: */
#define IDT_IMG_FORMAT 1751 /* Image Format: */
#define IDT_BLOCK_SIZE 1752 /* Block Size: */
#define IDT_PROGRESS 1753 /* Progress: */
#define IDT_SECTORS 1749 /* Sectors: */
#define IDT_HEADS 1750 /* Heads: */
#define IDT_CYLS 1751 /* Cylinders: */
#define IDT_SIZE_MB 1752 /* Size (MB): */
#define IDT_TYPE 1753 /* Type: */
#define IDT_FILE_NAME 1754 /* File name: */
#define IDT_IMG_FORMAT 1755 /* Image Format: */
#define IDT_BLOCK_SIZE 1756 /* Block Size: */
#define IDT_PROGRESS 1757 /* Progress: */
/* DLG_CFG_FLOPPY_AND_CDROM_DRIVES */
#define IDT_FLOPPY_DRIVES 1754 /* Floppy drives: */
#define IDT_FDD_TYPE 1755 /* Type: */
#define IDT_CD_DRIVES 1756 /* CD-ROM drives: */
#define IDT_CD_BUS 1757 /* Bus: */
#define IDT_CD_ID 1758 /* ID: */
#define IDT_CD_LUN 1759 /* LUN: */
#define IDT_CD_CHANNEL 1760 /* Channel: */
#define IDT_CD_SPEED 1761 /* Speed: */
#define IDT_FLOPPY_DRIVES 1758 /* Floppy drives: */
#define IDT_FDD_TYPE 1759 /* Type: */
#define IDT_CD_DRIVES 1760 /* CD-ROM drives: */
#define IDT_CD_BUS 1761 /* Bus: */
#define IDT_CD_ID 1762 /* ID: */
#define IDT_CD_LUN 1763 /* LUN: */
#define IDT_CD_CHANNEL 1764 /* Channel: */
#define IDT_CD_SPEED 1765 /* Speed: */
/* DLG_CFG_OTHER_REMOVABLE_DEVICES */
#define IDT_MO_DRIVES 1762 /* MO drives: */
#define IDT_MO_BUS 1763 /* Bus: */
#define IDT_MO_ID 1764 /* ID: */
#define IDT_MO_CHANNEL 1765 /* Channel */
#define IDT_MO_TYPE 1766 /* Type: */
#define IDT_MO_DRIVES 1766 /* MO drives: */
#define IDT_MO_BUS 1767 /* Bus: */
#define IDT_MO_ID 1768 /* ID: */
#define IDT_MO_CHANNEL 1769 /* Channel */
#define IDT_MO_TYPE 1770 /* Type: */
#define IDT_ZIP_DRIVES 1767 /* ZIP drives: */
#define IDT_ZIP_BUS 1768 /* Bus: */
#define IDT_ZIP_ID 1769 /* ID: */
#define IDT_ZIP_LUN 1770 /* LUN: */
#define IDT_ZIP_CHANNEL 1771 /* Channel: */
#define IDT_ZIP_DRIVES 1771 /* ZIP drives: */
#define IDT_ZIP_BUS 1772 /* Bus: */
#define IDT_ZIP_ID 1773 /* ID: */
#define IDT_ZIP_LUN 1774 /* LUN: */
#define IDT_ZIP_CHANNEL 1775 /* Channel: */
/* DLG_CFG_PERIPHERALS */
#define IDT_ISARTC 1772 /* ISA RTC: */
#define IDT_ISAMEM_1 1773 /* ISAMEM Board #1: */
#define IDT_ISAMEM_2 1774 /* ISAMEM Board #2: */
#define IDT_ISAMEM_3 1775 /* ISAMEM Board #3: */
#define IDT_ISAMEM_4 1776 /* ISAMEM Board #4: */
#define IDT_ISARTC 1776 /* ISA RTC: */
#define IDT_ISAMEM_1 1777 /* ISAMEM Board #1: */
#define IDT_ISAMEM_2 1778 /* ISAMEM Board #2: */
#define IDT_ISAMEM_3 1779 /* ISAMEM Board #3: */
#define IDT_ISAMEM_4 1780 /* ISAMEM Board #4: */
/*
* To try to keep these organized, we now group the
@@ -199,10 +202,10 @@
#define IDC_CONFIGURE_MOUSE 1034
#define IDC_SOUND 1040 /* sound config */
#define IDC_COMBO_SOUND 1041
#define IDC_CHECK_SSI 1042
#define IDC_CHECK_CMS 1043
#define IDC_CHECK_GUS 1044
#define IDC_COMBO_SOUND1 1041
#define IDC_COMBO_SOUND2 1042
#define IDC_COMBO_SOUND3 1043
#define IDC_COMBO_SOUND4 1044
#define IDC_COMBO_MIDI_OUT 1045
#define IDC_CHECK_MPU401 1046
#define IDC_CONFIGURE_MPU401 1047
@@ -329,19 +332,22 @@
#define IDC_CONFIG_BASE 1300
#define IDC_CONFIGURE_VID 1300
#define IDC_CONFIGURE_VID_2 1301
#define IDC_CONFIGURE_SND 1302
#define IDC_CONFIGURE_VOODOO 1303
#define IDC_CONFIGURE_MOD 1304
#define IDC_CONFIGURE_NET_TYPE 1305
#define IDC_CONFIGURE_BUSLOGIC 1306
#define IDC_CONFIGURE_PCAP 1307
#define IDC_CONFIGURE_NET 1308
#define IDC_CONFIGURE_MIDI_OUT 1309
#define IDC_CONFIGURE_MIDI_IN 1310
#define IDC_JOY1 1311
#define IDC_JOY2 1312
#define IDC_JOY3 1313
#define IDC_JOY4 1314
#define IDC_CONFIGURE_SND1 1302
#define IDC_CONFIGURE_SND2 1303
#define IDC_CONFIGURE_SND3 1304
#define IDC_CONFIGURE_SND4 1305
#define IDC_CONFIGURE_VOODOO 1306
#define IDC_CONFIGURE_MOD 1307
#define IDC_CONFIGURE_NET_TYPE 1308
#define IDC_CONFIGURE_BUSLOGIC 1309
#define IDC_CONFIGURE_PCAP 1310
#define IDC_CONFIGURE_NET 1311
#define IDC_CONFIGURE_MIDI_OUT 1312
#define IDC_CONFIGURE_MIDI_IN 1313
#define IDC_JOY1 1314
#define IDC_JOY2 1315
#define IDC_JOY3 1316
#define IDC_JOY4 1317
#define IDC_HDTYPE 1380
#define IDC_RENDER 1381
#define IDC_STATUS 1382

View File

@@ -20,6 +20,8 @@
#ifndef EMU_SOUND_H
#define EMU_SOUND_H
#define SOUND_CARD_MAX 4 /* currently we support up to 4 sound cards and a standalome MPU401 */
extern int sound_gain;
#define SOUNDBUFLEN (48000 / 50)
@@ -38,7 +40,7 @@ extern int gated,
speakon;
extern int sound_pos_global;
extern int sound_card_current;
extern int sound_card_current[SOUND_CARD_MAX];
extern void sound_add_handler(void (*get_buffer)(int32_t *buffer,
int len, void *p),