Right now, the current order pretty much means that pulse defaults to S16 for arbitrary unsupported formats, but fallback to float would make more sense since it's the easiest to convert everything to without requiring dithering, and PA will probably just internally convert things to float anyway. Also move S32 above S16, which essentially means format_maps is sorted by preference. (Although ao_pulse currently ignores this and always picks the first as a fallback)
Unified · Split
| @@ -191,9 +191,9 @@ static const struct format_map { · 190 unmodified lines | ||
| 191 | 191 | int mp_format; |
| 192 | 192 | pa_sample_format_t pa_format; |
| 193 | 193 | } format_maps[] = { |
| 194 | − {AF_FORMAT_S16, PA_SAMPLE_S16NE}, | |
| 195 | − {AF_FORMAT_S32, PA_SAMPLE_S32NE}, | |
| 196 | 194 | {AF_FORMAT_FLOAT, PA_SAMPLE_FLOAT32NE}, |
| 195 | + {AF_FORMAT_S32, PA_SAMPLE_S32NE}, | |
| 196 | + {AF_FORMAT_S16, PA_SAMPLE_S16NE}, | |
| 197 | 197 | {AF_FORMAT_U8, PA_SAMPLE_U8}, |
| 198 | 198 | {AF_FORMAT_UNKNOWN, 0} |
| 199 | 199 | }; |