mirror of
https://github.com/mpv-player/mpv
synced 2025-04-26 05:09:29 +00:00
ao_alsa: add debug messages for format search
This commit is contained in:
parent
beae60bcd5
commit
8f33c65fe0
@ -483,9 +483,11 @@ static int init_device(struct ao *ao, bool second_try)
|
|||||||
af_get_best_sample_formats(ao->format, try_formats);
|
af_get_best_sample_formats(ao->format, try_formats);
|
||||||
for (int n = 0; try_formats[n]; n++) {
|
for (int n = 0; try_formats[n]; n++) {
|
||||||
p->alsa_fmt = find_alsa_format(try_formats[n]);
|
p->alsa_fmt = find_alsa_format(try_formats[n]);
|
||||||
|
MP_DBG(ao, "Trying format %s\n", af_fmt_to_str(try_formats[n]));
|
||||||
if (snd_pcm_hw_params_test_format(p->alsa, alsa_hwparams, p->alsa_fmt) >= 0) {
|
if (snd_pcm_hw_params_test_format(p->alsa, alsa_hwparams, p->alsa_fmt) >= 0) {
|
||||||
ao->format = try_formats[n];
|
ao->format = try_formats[n];
|
||||||
found_format = true;
|
found_format = true;
|
||||||
|
MP_DBG(ao, "Selectedformat %s\n", af_fmt_to_str(ao->format));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user