diff options
author | Max Kellermann <max@duempel.org> | 2010-05-13 15:42:20 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2010-05-14 09:48:02 +0200 |
commit | 6c831e04a298581966d75a2059b8735c387a0e09 (patch) | |
tree | fff55529aceda02f1c61ea6134c009ea7bfdb01b /src | |
parent | 67c48f66a63aaf7354dde658a3ffd9fca6a9b9b7 (diff) | |
download | mpd-6c831e04a298581966d75a2059b8735c387a0e09.tar.gz mpd-6c831e04a298581966d75a2059b8735c387a0e09.tar.xz mpd-6c831e04a298581966d75a2059b8735c387a0e09.zip |
output/oss: 24 bit support via OSS4
Added #ifdefs on the macros AFMT_S24_NE and other OSS4 extensions.
Diffstat (limited to '')
-rw-r--r-- | src/output/oss_plugin.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/output/oss_plugin.c b/src/output/oss_plugin.c index da1fb3401..cb50954cc 100644 --- a/src/output/oss_plugin.c +++ b/src/output/oss_plugin.c @@ -381,9 +381,25 @@ sample_format_to_oss(enum sample_format format) return AFMT_S16_NE; case SAMPLE_FORMAT_S24: +#ifdef AFMT_S24_PACKED + return AFMT_S24_PACKED; +#else + return AFMT_QUERY; +#endif + case SAMPLE_FORMAT_S24_P32: +#ifdef AFMT_S24_NE + return AFMT_S24_NE; +#else + return AFMT_QUERY; +#endif + case SAMPLE_FORMAT_S32: +#ifdef AFMT_S32_NE + return AFMT_S32_NE; +#else return AFMT_QUERY; +#endif } return AFMT_QUERY; @@ -403,6 +419,21 @@ sample_format_from_oss(int format) case AFMT_S16_NE: return SAMPLE_FORMAT_S16; +#ifdef AFMT_S24_PACKED + case AFMT_S24_PACKED: + return SAMPLE_FORMAT_S24; +#endif + +#ifdef AFMT_S24_NE + case AFMT_S24_NE: + return SAMPLE_FORMAT_S24_P32; +#endif + +#ifdef AFMT_S32_NE + case AFMT_S32_NE: + return SAMPLE_FORMAT_S32; +#endif + default: return SAMPLE_FORMAT_UNDEFINED; } @@ -443,6 +474,9 @@ oss_setup_sample_format(int fd, struct audio_format *audio_format, other formats supported by MPD */ static const enum sample_format sample_formats[] = { + SAMPLE_FORMAT_S24_P32, + SAMPLE_FORMAT_S32, + SAMPLE_FORMAT_S24, SAMPLE_FORMAT_S16, SAMPLE_FORMAT_S8, SAMPLE_FORMAT_UNDEFINED /* sentinel */ |