New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AdLib Gold changes: #2003
AdLib Gold changes: #2003
Conversation
Properly implemented MIDI Out/In. Changed the ID from 0x50/0x70 to 0x51/0x71 to identify as AdLib Gold 1000. Added CD Audio volume and filter.
src/sound/snd_adlibgold.c
Outdated
@@ -62,6 +62,7 @@ typedef struct adgold_t | |||
int samp_vol_l, samp_vol_r; | |||
int aux_vol_l, aux_vol_r; | |||
int vol_l, vol_r; | |||
int aux_vol_l, aux_vol_r; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duplicate line, should be removed
@@ -935,6 +965,7 @@ void *adgold_init(const device_t *info) | |||
timer_add(&adgold->adgold_mma_timer_count, adgold_timer_poll, adgold, 1); | |||
|
|||
sound_add_handler(adgold_get_buffer, adgold); | |||
sound_set_cd_audio_filter(adgold_filter_cd_audio, adgold); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duplicate line, should be removed
src/sound/snd_adlibgold.c
Outdated
static void | ||
adgold_filter_cd_audio(int channel, double *buffer, void *p) | ||
{ | ||
adgold_t *adgold = (adgold_t *)p; | ||
double c; | ||
double volume = channel ? adgold->aux_vol_r : adgold->aux_vol_l; | ||
|
||
c = ((*buffer) * volume) / 128.0; /*Workaround to the low volume*/ | ||
*buffer = c; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not needed -- Ompronce has already implemented this
Polish translation
Properly implemented MIDI Out/In.
Changed the ID from 0x50/0x70 to 0x51/0x71 to identify as AdLib Gold 1000.
Added CD Audio volume and filter (Courtsey of Ompronce!)
Summary
See above.
Checklist
References
Provide links to datasheets or other documentation that helped you implement this pull request.