You are correct, my mistake!
On Tue, 21 May 2019, Tetsuya Isaki wrote:
At Thu, 9 May 2019 10:28:19 -0300 (ADT),
Jared McNeill wrote:
With order of operations here, and track->volume being in range 0...256, I
don't think this will work anyway. volume of 255 of less will cause the
sample to be 0, and 256 the original value.
(A * B >> C) is equivalent to ((A * B) >> C).
(A * B / C) is equivalent to ((A * B) / C).
And in fact it worked.
# I'm sorry if I misread your text.
Thanks,
---
Tetsuya Isaki <is...@pastel-flower.jp / is...@netbsd.org>
5234:#if defined(AUDIO_USE_C_IMPLEMENTATION_DEFINED_BEHAVIOR) &&
defined(__GNUC__)
5235- *d++ += ((aint2_t)*s++) * track->volume >> 8;
5236-#else
5237- *d++ += ((aint2_t)*s++) * track->volume / 256;
5238-#endif