diff options
author | Tanu Kaskinen <tanuk@iki.fi> | 2009-08-19 09:20:02 +0300 |
---|---|---|
committer | Tanu Kaskinen <tanuk@iki.fi> | 2009-08-19 09:20:02 +0300 |
commit | 292d6dcb5f1568fdc66a813cc464c66571092991 (patch) | |
tree | 1786a2b46e93e97a2e012faf40f46ea00d1cae80 /src/modules/bluetooth/module-bluetooth-device.c | |
parent | b4e0d5d1e17409557d21dae9a770d1429e17cb15 (diff) | |
parent | f4f16ab10d31e61f1ca8867c2dad9874025637f8 (diff) |
Merge branch 'master' of git://0pointer.de/pulseaudio into dbus-work
Diffstat (limited to 'src/modules/bluetooth/module-bluetooth-device.c')
-rw-r--r-- | src/modules/bluetooth/module-bluetooth-device.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/bluetooth/module-bluetooth-device.c b/src/modules/bluetooth/module-bluetooth-device.c index d6321fc4..4e23862c 100644 --- a/src/modules/bluetooth/module-bluetooth-device.c +++ b/src/modules/bluetooth/module-bluetooth-device.c @@ -1476,12 +1476,12 @@ static void sink_set_volume_cb(pa_sink *s) { if (u->profile != PROFILE_HSP) return; - gain = (pa_cvolume_max(&s->virtual_volume) * 15) / PA_VOLUME_NORM; + gain = (pa_cvolume_max(&s->real_volume) * 15) / PA_VOLUME_NORM; if (gain > 15) gain = 15; - pa_cvolume_set(&s->virtual_volume, u->sample_spec.channels, (pa_volume_t) (gain * PA_VOLUME_NORM / 15)); + pa_cvolume_set(&s->real_volume, u->sample_spec.channels, (pa_volume_t) (gain * PA_VOLUME_NORM / 15)); pa_assert_se(m = dbus_message_new_method_call("org.bluez", u->path, "org.bluez.Headset", "SetSpeakerGain")); pa_assert_se(dbus_message_append_args(m, DBUS_TYPE_UINT16, &gain, DBUS_TYPE_INVALID)); @@ -1500,12 +1500,12 @@ static void source_set_volume_cb(pa_source *s) { if (u->profile != PROFILE_HSP) return; - gain = (pa_cvolume_max(&s->virtual_volume) * 15) / PA_VOLUME_NORM; + gain = (pa_cvolume_max(&s->volume) * 15) / PA_VOLUME_NORM; if (gain > 15) gain = 15; - pa_cvolume_set(&s->virtual_volume, u->sample_spec.channels, (pa_volume_t) (gain * PA_VOLUME_NORM / 15)); + pa_cvolume_set(&s->volume, u->sample_spec.channels, (pa_volume_t) (gain * PA_VOLUME_NORM / 15)); pa_assert_se(m = dbus_message_new_method_call("org.bluez", u->path, "org.bluez.Headset", "SetMicrophoneGain")); pa_assert_se(dbus_message_append_args(m, DBUS_TYPE_UINT16, &gain, DBUS_TYPE_INVALID)); |