Skip to content

Commit

Permalink
Rewritten mapper 19.
Browse files Browse the repository at this point in the history
See #276.
  • Loading branch information
punesemu committed Jan 15, 2023
1 parent 451c0e0 commit 6fe668a
Show file tree
Hide file tree
Showing 4 changed files with 269 additions and 234 deletions.
8 changes: 4 additions & 4 deletions src/audio/blipbuf.c
Original file line number Diff line number Diff line change
Expand Up @@ -332,11 +332,11 @@ static void apu_tick_blipbuf_Namco_N163(void) {
blipbuf.output = 0;

if (++blipbuf.n163.period == blipbuf.n163.min_period) {
double gain = 2.5f / (float)(8 - n163.snd_ch_start);
double gain = 2.5f / (float)(8 - n163.snd.channel_start);

for (i = n163.snd_ch_start; i < 8; i++) {
if (n163.ch[i].active) {
blipbuf.output += (SWORD)((double)n163.ch[i].output * gain);
if (n163.snd.enabled) {
for (i = n163.snd.channel_start; i < 8; i++) {
blipbuf.output += (SWORD)((double)n163.snd.output[i] * gain);
}
}
blipbuf.output = (SWORD)(ch_gain_ext(blipbuf.output, 1.0f));
Expand Down
Loading

0 comments on commit 6fe668a

Please sign in to comment.