output/oss: 24 bit support via OSS4
Added #ifdefs on the macros AFMT_S24_NE and other OSS4 extensions.
This commit is contained in:
parent
67c48f66a6
commit
6c831e04a2
1
NEWS
1
NEWS
|
@ -56,6 +56,7 @@ ver 0.16 (20??/??/??)
|
||||||
- jack: support more than two audio channels
|
- jack: support more than two audio channels
|
||||||
- httpd: bind port when output is enabled
|
- httpd: bind port when output is enabled
|
||||||
- httpd: added name/genre/website configuration
|
- httpd: added name/genre/website configuration
|
||||||
|
- oss: 24 bit support via OSS4
|
||||||
- wildcards allowed in audio_format configuration
|
- wildcards allowed in audio_format configuration
|
||||||
- consistently lock audio output objects
|
- consistently lock audio output objects
|
||||||
* player:
|
* player:
|
||||||
|
|
|
@ -381,9 +381,25 @@ sample_format_to_oss(enum sample_format format)
|
||||||
return AFMT_S16_NE;
|
return AFMT_S16_NE;
|
||||||
|
|
||||||
case SAMPLE_FORMAT_S24:
|
case SAMPLE_FORMAT_S24:
|
||||||
case SAMPLE_FORMAT_S24_P32:
|
#ifdef AFMT_S24_PACKED
|
||||||
case SAMPLE_FORMAT_S32:
|
return AFMT_S24_PACKED;
|
||||||
|
#else
|
||||||
return AFMT_QUERY;
|
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;
|
return AFMT_QUERY;
|
||||||
|
@ -403,6 +419,21 @@ sample_format_from_oss(int format)
|
||||||
case AFMT_S16_NE:
|
case AFMT_S16_NE:
|
||||||
return SAMPLE_FORMAT_S16;
|
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:
|
default:
|
||||||
return SAMPLE_FORMAT_UNDEFINED;
|
return SAMPLE_FORMAT_UNDEFINED;
|
||||||
}
|
}
|
||||||
|
@ -443,6 +474,9 @@ oss_setup_sample_format(int fd, struct audio_format *audio_format,
|
||||||
other formats supported by MPD */
|
other formats supported by MPD */
|
||||||
|
|
||||||
static const enum sample_format sample_formats[] = {
|
static const enum sample_format sample_formats[] = {
|
||||||
|
SAMPLE_FORMAT_S24_P32,
|
||||||
|
SAMPLE_FORMAT_S32,
|
||||||
|
SAMPLE_FORMAT_S24,
|
||||||
SAMPLE_FORMAT_S16,
|
SAMPLE_FORMAT_S16,
|
||||||
SAMPLE_FORMAT_S8,
|
SAMPLE_FORMAT_S8,
|
||||||
SAMPLE_FORMAT_UNDEFINED /* sentinel */
|
SAMPLE_FORMAT_UNDEFINED /* sentinel */
|
||||||
|
|
Loading…
Reference in New Issue