Added auxillary registers (used for line in and CD audio) to AdLib Gold mixer
This commit is contained in:
@@ -60,6 +60,7 @@ typedef struct adgold_t
|
|||||||
|
|
||||||
int fm_vol_l, fm_vol_r;
|
int fm_vol_l, fm_vol_r;
|
||||||
int samp_vol_l, samp_vol_r;
|
int samp_vol_l, samp_vol_r;
|
||||||
|
int aux_vol_l, aux_vol_r;
|
||||||
int vol_l, vol_r;
|
int vol_l, vol_r;
|
||||||
int treble, bass;
|
int treble, bass;
|
||||||
|
|
||||||
@@ -260,6 +261,14 @@ void adgold_write(uint16_t addr, uint8_t val, void *p)
|
|||||||
adgold->adgold_38x_regs[0x0c] = val;
|
adgold->adgold_38x_regs[0x0c] = val;
|
||||||
adgold->samp_vol_r = (int)(int8_t)(val - 128);
|
adgold->samp_vol_r = (int)(int8_t)(val - 128);
|
||||||
break;
|
break;
|
||||||
|
case 0x0d: /*Aux volume left*/
|
||||||
|
adgold->adgold_38x_regs[0x0d] = val;
|
||||||
|
adgold->aux_vol_l = (int)(int8_t)(val - 128);
|
||||||
|
break;
|
||||||
|
case 0x0e: /*Aux volume right*/
|
||||||
|
adgold->adgold_38x_regs[0x0e] = val;
|
||||||
|
adgold->aux_vol_r = (int)(int8_t)(val - 128);
|
||||||
|
break;
|
||||||
|
|
||||||
case 0x18: /*Surround*/
|
case 0x18: /*Surround*/
|
||||||
adgold->adgold_38x_regs[0x18] = val;
|
adgold->adgold_38x_regs[0x18] = val;
|
||||||
@@ -810,6 +819,8 @@ static void adgold_get_buffer(int32_t *buffer, int len, void *p)
|
|||||||
free(adgold_buffer);
|
free(adgold_buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*CD audio filter goes here*/
|
||||||
|
|
||||||
|
|
||||||
static void adgold_input_msg(void *p, uint8_t *msg, uint32_t len)
|
static void adgold_input_msg(void *p, uint8_t *msg, uint32_t len)
|
||||||
{
|
{
|
||||||
@@ -899,6 +910,8 @@ void *adgold_init(const device_t *info)
|
|||||||
adgold->fm_vol_r = (int)(int8_t)(adgold->adgold_eeprom[0x0a] - 128);
|
adgold->fm_vol_r = (int)(int8_t)(adgold->adgold_eeprom[0x0a] - 128);
|
||||||
adgold->samp_vol_l = (int)(int8_t)(adgold->adgold_eeprom[0x0b] - 128);
|
adgold->samp_vol_l = (int)(int8_t)(adgold->adgold_eeprom[0x0b] - 128);
|
||||||
adgold->samp_vol_r = (int)(int8_t)(adgold->adgold_eeprom[0x0c] - 128);
|
adgold->samp_vol_r = (int)(int8_t)(adgold->adgold_eeprom[0x0c] - 128);
|
||||||
|
adgold->aux_vol_l = (int)(int8_t)(adgold->adgold_eeprom[0x0d] - 128);
|
||||||
|
adgold->aux_vol_r = (int)(int8_t)(adgold->adgold_eeprom[0x0e] - 128);
|
||||||
|
|
||||||
adgold->adgold_mma_enable[0] = 0;
|
adgold->adgold_mma_enable[0] = 0;
|
||||||
adgold->adgold_mma_fifo_start[0] = adgold->adgold_mma_fifo_end[0] = 0;
|
adgold->adgold_mma_fifo_start[0] = adgold->adgold_mma_fifo_end[0] = 0;
|
||||||
@@ -913,6 +926,8 @@ void *adgold_init(const device_t *info)
|
|||||||
|
|
||||||
sound_add_handler(adgold_get_buffer, adgold);
|
sound_add_handler(adgold_get_buffer, adgold);
|
||||||
|
|
||||||
|
/*sound_set_cd_audio_filter(adgold_filter_cd_audio, adgold);*/
|
||||||
|
|
||||||
if (device_get_config_int("receive_input"))
|
if (device_get_config_int("receive_input"))
|
||||||
midi_in_handler(1, adgold_input_msg, adgold_input_sysex, adgold);
|
midi_in_handler(1, adgold_input_msg, adgold_input_sysex, adgold);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user