mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-10 13:29:58 -05:00
* make pa_sample_spec_snprint return point to written string
* first try of a http module git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@339 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
32bf3a106a
commit
4590f09d0b
10 changed files with 374 additions and 18 deletions
|
|
@ -101,15 +101,15 @@ const char *pa_sample_format_to_string(enum pa_sample_format f) {
|
|||
return table[f];
|
||||
}
|
||||
|
||||
void pa_sample_spec_snprint(char *s, size_t l, const struct pa_sample_spec *spec) {
|
||||
char *pa_sample_spec_snprint(char *s, size_t l, const struct pa_sample_spec *spec) {
|
||||
assert(s && l && spec);
|
||||
|
||||
if (!pa_sample_spec_valid(spec)) {
|
||||
if (!pa_sample_spec_valid(spec))
|
||||
snprintf(s, l, "Invalid");
|
||||
return;
|
||||
}
|
||||
|
||||
snprintf(s, l, "%s %uch %uHz", pa_sample_format_to_string(spec->format), spec->channels, spec->rate);
|
||||
else
|
||||
snprintf(s, l, "%s %uch %uHz", pa_sample_format_to_string(spec->format), spec->channels, spec->rate);
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
pa_volume_t pa_volume_multiply(pa_volume_t a, pa_volume_t b) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue