summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJob Bautista <jobbautista9@protonmail.com>2022-06-27 02:14:05 +0800
committerJob Bautista <jobbautista9@protonmail.com>2022-06-27 02:14:05 +0800
commit79e782e53f4ad38e924bf891f439f442ae818fe8 (patch)
treeebd02008a8a4081566c61de1b69b0d6caa411551
parentf9e0ed984903b12e64ac943b2cee3340a8aa9c4e (diff)
downloaduxp-79e782e53f4ad38e924bf891f439f442ae818fe8.tar.gz
Issue #1944 - Follow-up: Make it clear that volume is a float.
1. => 1.0, 0. => 0.0
-rw-r--r--media/libcubeb/src/cubeb_sndio.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/media/libcubeb/src/cubeb_sndio.c b/media/libcubeb/src/cubeb_sndio.c
index 3deb283e45..320b4212f5 100644
--- a/media/libcubeb/src/cubeb_sndio.c
+++ b/media/libcubeb/src/cubeb_sndio.c
@@ -279,7 +279,7 @@ sndio_stream_init(cubeb * context,
free(s);
return CUBEB_ERROR;
}
- s->volume = 1.;
+ s->volume = 1.0;
*stream = s;
DPR("sndio_stream_init() end, ok\n");
(void)context;
@@ -366,10 +366,10 @@ sndio_stream_set_volume(cubeb_stream *s, float volume)
{
DPR("sndio_stream_set_volume(%f)\n", volume);
pthread_mutex_lock(&s->mtx);
- if (volume < 0.)
- volume = 0.;
+ if (volume < 0.0)
+ volume = 0.0;
else if (volume > 1.0)
- volume = 1.;
+ volume = 1.0;
s->volume = volume;
pthread_mutex_unlock(&s->mtx);
return CUBEB_OK;