oss: support 24-bit sample formats

This works perfectly fine and is required for bitperfect mode on
some soundcards, according to Romain Tartière <romain@FreeBSD.org>

ref: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=198567#c6

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/277>
This commit is contained in:
Greg V 2020-04-02 19:15:29 +03:00 committed by PulseAudio Marge Bot
parent de2093fcc7
commit a9d1afbefd

View file

@ -164,8 +164,13 @@ int pa_oss_auto_format(int fd, pa_sample_spec *ss) {
[PA_SAMPLE_FLOAT32BE] = AFMT_QUERY, /* not supported */
[PA_SAMPLE_S32LE] = AFMT_QUERY, /* not supported */
[PA_SAMPLE_S32BE] = AFMT_QUERY, /* not supported */
#if defined(AFMT_S24_LE) && defined(AFMT_S24_BE)
[PA_SAMPLE_S24LE] = AFMT_S24_LE,
[PA_SAMPLE_S24BE] = AFMT_S24_BE,
#else
[PA_SAMPLE_S24LE] = AFMT_QUERY, /* not supported */
[PA_SAMPLE_S24BE] = AFMT_QUERY, /* not supported */
#endif
[PA_SAMPLE_S24_32LE] = AFMT_QUERY, /* not supported */
[PA_SAMPLE_S24_32BE] = AFMT_QUERY, /* not supported */
};