mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-24 16:17:29 +09:00
Issue #1944 - Follow-up: Make it clear that volume is a float.
1. => 1.0, 0. => 0.0
This commit is contained in:
parent
ef4db6f2aa
commit
5b40dbab42
1 changed files with 4 additions and 4 deletions
|
|
@ -279,7 +279,7 @@ sndio_stream_init(cubeb * context,
|
||||||
free(s);
|
free(s);
|
||||||
return CUBEB_ERROR;
|
return CUBEB_ERROR;
|
||||||
}
|
}
|
||||||
s->volume = 1.;
|
s->volume = 1.0;
|
||||||
*stream = s;
|
*stream = s;
|
||||||
DPR("sndio_stream_init() end, ok\n");
|
DPR("sndio_stream_init() end, ok\n");
|
||||||
(void)context;
|
(void)context;
|
||||||
|
|
@ -366,10 +366,10 @@ sndio_stream_set_volume(cubeb_stream *s, float volume)
|
||||||
{
|
{
|
||||||
DPR("sndio_stream_set_volume(%f)\n", volume);
|
DPR("sndio_stream_set_volume(%f)\n", volume);
|
||||||
pthread_mutex_lock(&s->mtx);
|
pthread_mutex_lock(&s->mtx);
|
||||||
if (volume < 0.)
|
if (volume < 0.0)
|
||||||
volume = 0.;
|
volume = 0.0;
|
||||||
else if (volume > 1.0)
|
else if (volume > 1.0)
|
||||||
volume = 1.;
|
volume = 1.0;
|
||||||
s->volume = volume;
|
s->volume = volume;
|
||||||
pthread_mutex_unlock(&s->mtx);
|
pthread_mutex_unlock(&s->mtx);
|
||||||
return CUBEB_OK;
|
return CUBEB_OK;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue