Skip to content
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

Merged
merged 7 commits into from Jan 21, 2022
Merged

AdLib Gold changes: #2003

merged 7 commits into from Jan 21, 2022

Conversation

TC1995
Copy link
Contributor

@TC1995 TC1995 commented Jan 20, 2022

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.

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.
@@ -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;
Copy link
Contributor

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);
Copy link
Contributor

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

Comment on lines 895 to 904
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;
}
Copy link
Contributor

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

@TC1995 TC1995 closed this Jan 21, 2022
@OBattler OBattler reopened this Jan 21, 2022
@OBattler OBattler merged commit 15db0e5 into master Jan 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants