Use pa_(c)volume_snprint_verbose() everywhere

All pa_cvolume_snprint(), pa_volume_snprint(),
pa_sw_cvolume_snprint_dB() and pa_sw_volume_snprint_dB() calls have
been replaced with pa_cvolume_snprint_verbose() and
pa_volume_snprint_verbose() calls, making the log output more
informative and the code sometimes simpler.
This commit is contained in:
Tanu Kaskinen 2013-04-03 16:36:43 +03:00
parent 596b2988a5
commit ee5e245afa
11 changed files with 212 additions and 177 deletions

View file

@ -266,7 +266,7 @@ static void sink_set_volume_cb(pa_sink *s) {
struct userdata *u = s->userdata;
pa_cvolume hw;
pa_volume_t v;
char t[PA_CVOLUME_SNPRINT_MAX];
char t[PA_CVOLUME_SNPRINT_VERBOSE_MAX];
pa_assert(u);
@ -285,9 +285,10 @@ static void sink_set_volume_cb(pa_sink *s) {
/* Perform any software manipulation of the volume needed */
pa_sw_cvolume_divide(&s->soft_volume, &s->real_volume, &hw);
pa_log_debug("Requested volume: %s", pa_cvolume_snprint(t, sizeof(t), &s->real_volume));
pa_log_debug("Got hardware volume: %s", pa_cvolume_snprint(t, sizeof(t), &hw));
pa_log_debug("Calculated software volume: %s", pa_cvolume_snprint(t, sizeof(t), &s->soft_volume));
pa_log_debug("Requested volume: %s", pa_cvolume_snprint_verbose(t, sizeof(t), &s->real_volume, &s->channel_map, false));
pa_log_debug("Got hardware volume: %s", pa_cvolume_snprint_verbose(t, sizeof(t), &hw, &s->channel_map, false));
pa_log_debug("Calculated software volume: %s",
pa_cvolume_snprint_verbose(t, sizeof(t), &s->soft_volume, &s->channel_map, true));
/* Any necessary software volume manipulation is done so set
our hw volume (or v as a single value) on the device */