mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
pulse-server: use PipeWire format and channel names
Use the PipeWire format and channel names in the config to avoid confusion.
This commit is contained in:
parent
b305f57e4d
commit
44e6e7f5c8
3 changed files with 32 additions and 6 deletions
|
|
@ -117,6 +117,15 @@ static inline const char *format_id2name(uint32_t format)
|
|||
}
|
||||
return "UNKNOWN";
|
||||
}
|
||||
static inline uint32_t format_name2id(const char *name)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; spa_type_audio_format[i].name; i++) {
|
||||
if (strcmp(name, spa_debug_type_short_name(spa_type_audio_format[i].name)) == 0)
|
||||
return spa_type_audio_format[i].type;
|
||||
}
|
||||
return SPA_AUDIO_CHANNEL_UNKNOWN;
|
||||
}
|
||||
|
||||
static inline uint32_t format_paname2id(const char *name, size_t size)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue