Logo Search packages:      
Sourcecode: pulseaudio version File versions  Download package

char* pa_volume_snprint ( char *  s,
size_t  l,
pa_volume_t  v 
)

Pretty print a volume

Since:
0.9.15

Definition at line 314 of file volume.c.

References PA_VOLUME_INVALID, and PA_VOLUME_NORM.

                                                          {
    pa_assert(s);
    pa_assert(l > 0);

    pa_init_i18n();

    if (v == PA_VOLUME_INVALID) {
        pa_snprintf(s, l, _("(invalid)"));
        return s;
    }

    pa_snprintf(s, l, "%3u%%", (v*100+PA_VOLUME_NORM/2)/PA_VOLUME_NORM);
    return s;
}


Generated by  Doxygen 1.6.0   Back to index