Logo Search packages:      
Sourcecode: pulseaudio version File versions

char* pa_sample_spec_snprint ( char *  s,
size_t  l,
const pa_sample_spec spec 
)

Pretty print a sample type specification to a string

Definition at line 159 of file sample.c.

References pa_sample_spec::channels, pa_sample_spec::format, and pa_sample_spec::rate.

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

    pa_init_i18n();

    if (!pa_sample_spec_valid(spec))
        pa_snprintf(s, l, _("(invalid)"));
    else
        pa_snprintf(s, l, _("%s %uch %uHz"), pa_sample_format_to_string(spec->format), spec->channels, spec->rate);

    return s;
}


Generated by  Doxygen 1.6.0   Back to index