History

ao_pulse: reorder format choice

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)

Niklas Haas committed 9 years ago

Commit bbe8bb01 parent 0744fc11 file · +2 −2Browse files

Unified · Split

audio/out/ao_pulse.c+2−2
@@ -191,9 +191,9 @@ static const struct format_map { · 190 unmodified lines
191191 int mp_format;
192192 pa_sample_format_t pa_format;
193193 } format_maps[] = {
194− {AF_FORMAT_S16, PA_SAMPLE_S16NE},
195− {AF_FORMAT_S32, PA_SAMPLE_S32NE},
196194 {AF_FORMAT_FLOAT, PA_SAMPLE_FLOAT32NE},
195+ {AF_FORMAT_S32, PA_SAMPLE_S32NE},
196+ {AF_FORMAT_S16, PA_SAMPLE_S16NE},
197197 {AF_FORMAT_U8, PA_SAMPLE_U8},
198198 {AF_FORMAT_UNKNOWN, 0}
199199 };

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t