mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
add new API call pa_cvolume_compatible()
This commit is contained in:
parent
619ed8a82d
commit
ebb2ecbe12
3 changed files with 19 additions and 0 deletions
|
|
@ -325,3 +325,17 @@ pa_cvolume *pa_cvolume_remap(pa_cvolume *v, pa_channel_map *from, pa_channel_map
|
|||
*v = result;
|
||||
return v;
|
||||
}
|
||||
|
||||
int pa_cvolume_compatible(const pa_cvolume *v, const pa_sample_spec *ss) {
|
||||
|
||||
pa_assert(v);
|
||||
pa_assert(ss);
|
||||
|
||||
if (!pa_cvolume_valid(v))
|
||||
return 0;
|
||||
|
||||
if (!pa_sample_spec_valid(ss))
|
||||
return 0;
|
||||
|
||||
return v->channels == ss->channels;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue