pa_assert(l > 0);
pa_assert(map);
+ pa_init_i18n();
+
+ if (!pa_channel_map_valid(map)) {
+ pa_snprintf(s, l, _("(invalid)"));
+ return s;
+ }
+
*(e = s) = 0;
for (channel = 0; channel < map->channels && l > 1; channel++) {
pa_init_i18n();
if (!pa_sample_spec_valid(spec))
- pa_snprintf(s, l, _("Invalid"));
+ pa_snprintf(s, l, _("(invalid)"));
else
pa_snprintf(s, l, "%s %uch %uHz", pa_sample_format_to_string(spec->format), spec->channels, spec->rate);
#include <stdio.h>
#include <string.h>
+#include <pulse/i18n.h>
#include <pulsecore/core-util.h>
#include <pulsecore/macro.h>
pa_assert(l > 0);
pa_assert(c);
+ pa_init_i18n();
+
+ if (!pa_cvolume_valid(c)) {
+ pa_snprintf(s, l, _("(invalid)"));
+ return s;
+ }
+
*(e = s) = 0;
for (channel = 0; channel < c->channels && l > 1; channel++) {