diff options
author | Michael Pavone <pavone@retrodev.com> | 2019-03-26 22:34:41 -0700 |
---|---|---|
committer | Michael Pavone <pavone@retrodev.com> | 2019-03-26 22:34:41 -0700 |
commit | 3f867b2206be833ee764acc5cfae4c0ce2780da1 (patch) | |
tree | 28b5a9fecd1f96038619a105749bc046e134ced5 /ym2612.c | |
parent | 214af23bafaa8c40fd98c117904703fc47a9aaa3 (diff) |
Zero offset should also impact output channels that a channel is panned away from
Diffstat (limited to 'ym2612.c')
-rw-r--r-- | ym2612.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -592,9 +592,21 @@ void ym_run(ym2612_context * context, uint32_t to_cycle) } if (context->channels[i].lr & 0x80) { left += (value * context->volume_mult) / context->volume_div; + } else if (context->zero_offset) { + if (value >= 0) { + left += (context->zero_offset * context->volume_mult) / context->volume_div; + } else { + left -= (context->zero_offset * context->volume_mult) / context->volume_div; + } } if (context->channels[i].lr & 0x40) { right += (value * context->volume_mult) / context->volume_div; + } else if (context->zero_offset) { + if (value >= 0) { + right += (context->zero_offset * context->volume_mult) / context->volume_div; + } else { + right -= (context->zero_offset * context->volume_mult) / context->volume_div; + } } } render_put_stereo_sample(context->audio, left, right); |