mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -05:00
pulse-server: add more valid formats
Add some more formats that can be used in pipewire streams so that pulseaudio will see them as valid devices/streams. It is possible that this will result in an invalid format on the client when there is no pulseaudio format defined, but that is ok. See !1499
This commit is contained in:
parent
6f84bef2b0
commit
28aa9ebe64
1 changed files with 7 additions and 0 deletions
|
|
@ -189,6 +189,9 @@ uint32_t sample_spec_frame_size(const struct sample_spec *ss)
|
|||
{
|
||||
switch (ss->format) {
|
||||
case SPA_AUDIO_FORMAT_U8:
|
||||
case SPA_AUDIO_FORMAT_U8P:
|
||||
case SPA_AUDIO_FORMAT_S8:
|
||||
case SPA_AUDIO_FORMAT_S8P:
|
||||
case SPA_AUDIO_FORMAT_ULAW:
|
||||
case SPA_AUDIO_FORMAT_ALAW:
|
||||
return ss->channels;
|
||||
|
|
@ -210,6 +213,10 @@ uint32_t sample_spec_frame_size(const struct sample_spec *ss)
|
|||
case SPA_AUDIO_FORMAT_S24_32_BE:
|
||||
case SPA_AUDIO_FORMAT_S24_32P:
|
||||
return 4 * ss->channels;
|
||||
case SPA_AUDIO_FORMAT_F64_LE:
|
||||
case SPA_AUDIO_FORMAT_F64_BE:
|
||||
case SPA_AUDIO_FORMAT_F64P:
|
||||
return 8 * ss->channels;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue