mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-12-17 08:56:42 -05:00
add new API function pa_channel_map_compatible()
This commit is contained in:
parent
5a9a6021f1
commit
cb0c97dae7
2 changed files with 11 additions and 0 deletions
|
|
@ -560,3 +560,10 @@ int pa_channel_map_valid(const pa_channel_map *map) {
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int pa_channel_map_compatible(const pa_channel_map *map, const pa_sample_spec *ss) {
|
||||||
|
pa_assert(map);
|
||||||
|
pa_assert(ss);
|
||||||
|
|
||||||
|
return map->channels == ss->channels;
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -214,6 +214,10 @@ int pa_channel_map_equal(const pa_channel_map *a, const pa_channel_map *b) PA_GC
|
||||||
/** Return non-zero of the specified channel map is considered valid */
|
/** Return non-zero of the specified channel map is considered valid */
|
||||||
int pa_channel_map_valid(const pa_channel_map *map) PA_GCC_PURE;
|
int pa_channel_map_valid(const pa_channel_map *map) PA_GCC_PURE;
|
||||||
|
|
||||||
|
/** Return non-zero if the specified channel map is compatible with
|
||||||
|
* the specified sample spec. \since 0.9.12 */
|
||||||
|
int pa_channel_map_compatible(const pa_channel_map *map, const pa_sample_spec *ss) PA_GCC_PURE;
|
||||||
|
|
||||||
PA_C_DECL_END
|
PA_C_DECL_END
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue