diff options
-rw-r--r-- | audio/out/ao_oss.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/audio/out/ao_oss.c b/audio/out/ao_oss.c index 32190877f6..393c9db780 100644 --- a/audio/out/ao_oss.c +++ b/audio/out/ao_oss.c @@ -313,7 +313,8 @@ static int reopen_device(struct ao *ao, bool allow_format_changes) } } - int try_formats[] = {format, AF_FORMAT_S32, AF_FORMAT_S24, AF_FORMAT_S16, 0}; + int try_formats[AF_FORMAT_COUNT]; + af_get_best_sample_formats(format, try_formats); for (int n = 0; try_formats[n]; n++) { format = try_formats[n]; if (try_format(ao, &format)) |