summaryrefslogtreecommitdiffstats
path: root/src/SinkWindow.cc
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2004-10-24 00:48:18 +0000
committerLennart Poettering <lennart@poettering.net>2004-10-24 00:48:18 +0000
commitc3959b71144e85a0393de9f2c8bcd999435f80af (patch)
tree8073ab9fa0930ca7a2fb98e2b36a44a1c5933507 /src/SinkWindow.cc
parentf98f6b457b8b5c1369b60685b85e93e9a48222fc (diff)
make use of user volume API
git-svn-id: file:///home/lennart/svn/public/paman/trunk@40 cdefa82f-4ce1-0310-97f5-ab6066f37c3c
Diffstat (limited to 'src/SinkWindow.cc')
-rw-r--r--src/SinkWindow.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/SinkWindow.cc b/src/SinkWindow.cc
index 76153d1..e551f53 100644
--- a/src/SinkWindow.cc
+++ b/src/SinkWindow.cc
@@ -74,7 +74,7 @@ void SinkWindow::updateInfo(const SinkInfo &i) {
SourceInfo *source = serverInfoManager->getSourceInfo(i.monitor_source);
monitorSourceLabel->set_text(source->name);
- percent = ((double) i.volume / 0x100) * 100;
+ percent = pa_volume_to_user(i.volume) * 100;
db = pa_volume_to_dB(i.volume);
volumeScale->set_value(percent);
if (db != PA_DECIBEL_MININFTY)
@@ -107,7 +107,7 @@ void SinkWindow::onToOwnerModuleButton() {
}
void SinkWindow::onVolumeScaleValueChanged() {
- serverInfoManager->setSinkVolume(index, (uint32_t) ((volumeScale->get_value()*0x100)/100));
+ serverInfoManager->setSinkVolume(index, pa_volume_from_user(volumeScale->get_value()/100));
}
void SinkWindow::onVolumeResetButton() {