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

@ -74,7 +74,7 @@ static int parse_pos(const char *pos, double *f) {
static pa_hook_result_t sink_input_fixate_hook_callback(pa_core *core, pa_sink_input_new_data *data, struct userdata *u) {
const char *hpos, *vpos, *role, *id;
double f;
char t[PA_CVOLUME_SNPRINT_MAX];
char t[PA_CVOLUME_SNPRINT_VERBOSE_MAX];
pa_cvolume v;
pa_assert(data);
@ -132,7 +132,12 @@ static pa_hook_result_t sink_input_fixate_hook_callback(pa_core *core, pa_sink_i
}
}
pa_log_debug("Final volume factor %s.", pa_cvolume_snprint(t, sizeof(t), &v));
pa_log_debug("Final volume factor %s.",
pa_cvolume_snprint_verbose(t,
sizeof(t),
&v,
&data->sink->channel_map,
data->sink->flags & PA_SINK_DECIBEL_VOLUME));
pa_sink_input_new_data_add_volume_factor_sink(data, u->name, &v);
return PA_HOOK_OK;