Skip to content

Commit

Permalink
Fixed missing gain adjustment on mono sources (thanks, @mindabuse!).
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Apr 1, 2018
1 parent 2b92116 commit 07b2f3c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mojoal.c
Expand Up @@ -511,7 +511,7 @@ static void mix_source_data_float32(ALCcontext *ctx, ALsource *src, const int ch
}
} else {
for (i = 0; i < iterations; i++) {
const float samp = *(data++);
const float samp = *(data++) * gain;
*(stream++) += samp;
*(stream++) += samp;
}
Expand All @@ -525,8 +525,8 @@ static void mix_source_data_float32(ALCcontext *ctx, ALsource *src, const int ch
}
} else {
for (i = 0; i < iterations; i++) {
const float samp = *(data++);
*(stream++) += samp * gain;
const float samp = *(data++) * gain;
*(stream++) += samp;
}
}
}
Expand Down

0 comments on commit 07b2f3c

Please sign in to comment.