summaryrefslogtreecommitdiff
path: root/src/pcm/Mix.cxx
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2020-03-15 23:33:21 -0700
committerRosen Penev <rosenp@gmail.com>2020-03-16 12:43:24 -0700
commit6d91b5c7b21926137c63561e313afd1fb72274f8 (patch)
treefb3424a20e839954df416e1af8316fc3ca3b9f78 /src/pcm/Mix.cxx
parentfd71514068be53a98c8f4b87d3164fd632ab24cb (diff)
fix double promotions
Found with -Wdouble-promotion Signed-off-by: Rosen Penev <rosenp@gmail.com>
Diffstat (limited to 'src/pcm/Mix.cxx')
-rw-r--r--src/pcm/Mix.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pcm/Mix.cxx b/src/pcm/Mix.cxx
index a39a85947..ed2b0f8db 100644
--- a/src/pcm/Mix.cxx
+++ b/src/pcm/Mix.cxx
@@ -221,7 +221,7 @@ pcm_mix(PcmDither &dither, void *buffer1, const void *buffer2, size_t size,
if (portion1 < 0)
return pcm_add(buffer1, buffer2, size, format);
- s = sin(M_PI_2 * portion1);
+ s = std::sin((float)M_PI_2 * portion1);
s *= s;
int vol1 = lround(s * PCM_VOLUME_1S);