mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
spa: add spa_strendswith (copy from protocol-pulse)
Useful function, let's make it generally available.
This commit is contained in:
parent
71d39e90ed
commit
0880ff9a84
7 changed files with 50 additions and 15 deletions
|
|
@ -197,14 +197,6 @@ static inline int node_state(enum pw_node_state state)
|
|||
return STATE_INVALID;
|
||||
}
|
||||
|
||||
static inline bool pw_endswith(const char *s, const char *sfx)
|
||||
{
|
||||
size_t l1, l2;
|
||||
l1 = strlen(s);
|
||||
l2 = strlen(sfx);
|
||||
return l1 >= l2 && strcmp(s + l1 - l2, sfx) == 0;
|
||||
}
|
||||
|
||||
enum {
|
||||
SINK_HW_VOLUME_CTRL = 0x0001U,
|
||||
SINK_LATENCY = 0x0002U,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue