fix error with pulse volume calculations which prevented volume from reaching 100%

SVN revision: 80150
This commit is contained in:
Mike Blumenkrantz 2012-12-04 12:55:48 +00:00
parent 427857d239
commit 64371a3aed
1 changed files with 1 additions and 1 deletions

View File

@ -540,7 +540,7 @@ pulse_sink_channel_volume_set(Pulse *conn, Pulse_Sink *sink, uint32_t id, double
tag->data = malloc(tag->dsize);
tag->tag_count = conn->tag_count;
if (vol <= 0.0) sink->volume.values[id] = PA_VOLUME_MUTED;
else sink->volume.values[id] = ((vol * PA_VOLUME_NORM) - (PA_VOLUME_NORM / 2)) / 100;
else sink->volume.values[id] = (vol * PA_VOLUME_NORM) / 100;
tag_simple_init(conn, tag, type, PA_TAG_U32);
tag_uint32(tag, sink->index);
tag_string(tag, NULL);