Skip to content

Commit

Permalink
PipeWire: Only handle sample sizes that are a multiple of 8 bits
Browse files Browse the repository at this point in the history
Or, in other words, samples that can be represented using standard data types.

This is also for consistency with the other backends.
  • Loading branch information
davidebeatrici committed Mar 19, 2024
1 parent ecd901f commit 24f71f0
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions src/backends/PipeWire/PipeWire.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -599,12 +599,8 @@ static constexpr spa_audio_format translateFormat(const CrossAudio_BitFormat for
return SPA_AUDIO_FORMAT_S8;
case 16:
return SPA_AUDIO_FORMAT_S16;
case 18:
return SPA_AUDIO_FORMAT_S18;
case 20:
return SPA_AUDIO_FORMAT_S20;
case 24:
return SPA_AUDIO_FORMAT_S24;
return SPA_AUDIO_FORMAT_S24_32;
case 32:
return SPA_AUDIO_FORMAT_S32;
}
Expand All @@ -616,12 +612,8 @@ static constexpr spa_audio_format translateFormat(const CrossAudio_BitFormat for
return SPA_AUDIO_FORMAT_U8;
case 16:
return SPA_AUDIO_FORMAT_U16;
case 18:
return SPA_AUDIO_FORMAT_U18;
case 20:
return SPA_AUDIO_FORMAT_U20;
case 24:
return SPA_AUDIO_FORMAT_U24;
return SPA_AUDIO_FORMAT_U24_32;
case 32:
return SPA_AUDIO_FORMAT_U32;
}
Expand Down

0 comments on commit 24f71f0

Please sign in to comment.