mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
pulse-server: fix format names
This commit is contained in:
parent
5b32125d44
commit
d3ee29caff
1 changed files with 7 additions and 8 deletions
|
|
@ -51,18 +51,18 @@ struct format {
|
||||||
|
|
||||||
static const struct format audio_formats[] = {
|
static const struct format audio_formats[] = {
|
||||||
[SAMPLE_U8] = { SPA_AUDIO_FORMAT_U8, "u8", 1 },
|
[SAMPLE_U8] = { SPA_AUDIO_FORMAT_U8, "u8", 1 },
|
||||||
[SAMPLE_ALAW] = { SPA_AUDIO_FORMAT_UNKNOWN, "alaw", 1 },
|
[SAMPLE_ALAW] = { SPA_AUDIO_FORMAT_UNKNOWN, "aLaw", 1 },
|
||||||
[SAMPLE_ULAW] = { SPA_AUDIO_FORMAT_UNKNOWN, "ulaw", 1 },
|
[SAMPLE_ULAW] = { SPA_AUDIO_FORMAT_UNKNOWN, "uLaw", 1 },
|
||||||
[SAMPLE_S16LE] = { SPA_AUDIO_FORMAT_S16_LE, "s16le", 2 },
|
[SAMPLE_S16LE] = { SPA_AUDIO_FORMAT_S16_LE, "s16le", 2 },
|
||||||
[SAMPLE_S16BE] = { SPA_AUDIO_FORMAT_S16_BE, "s16be", 2 },
|
[SAMPLE_S16BE] = { SPA_AUDIO_FORMAT_S16_BE, "s16be", 2 },
|
||||||
[SAMPLE_FLOAT32LE] = { SPA_AUDIO_FORMAT_F32_LE, "f32le", 4 },
|
[SAMPLE_FLOAT32LE] = { SPA_AUDIO_FORMAT_F32_LE, "float32le", 4 },
|
||||||
[SAMPLE_FLOAT32BE] = { SPA_AUDIO_FORMAT_F32_BE, "f32be", 4 },
|
[SAMPLE_FLOAT32BE] = { SPA_AUDIO_FORMAT_F32_BE, "float32be", 4 },
|
||||||
[SAMPLE_S32LE] = { SPA_AUDIO_FORMAT_S32_LE, "s32le", 4 },
|
[SAMPLE_S32LE] = { SPA_AUDIO_FORMAT_S32_LE, "s32le", 4 },
|
||||||
[SAMPLE_S32BE] = { SPA_AUDIO_FORMAT_S32_BE, "s32be", 4 },
|
[SAMPLE_S32BE] = { SPA_AUDIO_FORMAT_S32_BE, "s32be", 4 },
|
||||||
[SAMPLE_S24LE] = { SPA_AUDIO_FORMAT_S24_LE, "s24le", 3 },
|
[SAMPLE_S24LE] = { SPA_AUDIO_FORMAT_S24_LE, "s24le", 3 },
|
||||||
[SAMPLE_S24BE] = { SPA_AUDIO_FORMAT_S24_BE, "s24be", 3 },
|
[SAMPLE_S24BE] = { SPA_AUDIO_FORMAT_S24_BE, "s24be", 3 },
|
||||||
[SAMPLE_S24_32LE] = { SPA_AUDIO_FORMAT_S24_32_LE, "s24_32le", 4 },
|
[SAMPLE_S24_32LE] = { SPA_AUDIO_FORMAT_S24_32_LE, "s24-32le", 4 },
|
||||||
[SAMPLE_S24_32BE] = { SPA_AUDIO_FORMAT_S24_32_BE, "s24_32be", 4 },
|
[SAMPLE_S24_32BE] = { SPA_AUDIO_FORMAT_S24_32_BE, "s24-32be", 4 },
|
||||||
};
|
};
|
||||||
|
|
||||||
static inline uint32_t format_pa2id(enum sample_format format)
|
static inline uint32_t format_pa2id(enum sample_format format)
|
||||||
|
|
@ -365,8 +365,7 @@ static const struct spa_pod *format_info_build_param(struct spa_pod_builder *b,
|
||||||
return NULL;
|
return NULL;
|
||||||
if (str[0] != '\"')
|
if (str[0] != '\"')
|
||||||
return NULL;
|
return NULL;
|
||||||
str++;
|
size = strcspn(++str, "\"");
|
||||||
size = strcspn(str, "\"");
|
|
||||||
ss.format = format_name2pa(str, size);
|
ss.format = format_name2pa(str, size);
|
||||||
if (ss.format == SAMPLE_INVALID)
|
if (ss.format == SAMPLE_INVALID)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue