mirror of
https://github.com/mpv-player/mpv
synced 2024-12-12 01:46:16 +00:00
ao_alsa: log requested numbers of channels if ALSA rejects them
This commit is contained in:
parent
7b09654c33
commit
ad9bce2a5c
@ -501,11 +501,12 @@ static int init_device(struct ao *ao, bool second_try)
|
||||
}
|
||||
|
||||
if (num_channels != ao->channels.num) {
|
||||
int req = ao->channels.num;
|
||||
mp_chmap_from_channels_alsa(&ao->channels, num_channels);
|
||||
if (!mp_chmap_is_valid(&ao->channels))
|
||||
mp_chmap_from_channels(&ao->channels, 2);
|
||||
MP_ERR(ao, "Couldn't get requested number of channels, fallback to %s.\n",
|
||||
mp_chmap_to_str(&ao->channels));
|
||||
MP_ERR(ao, "Couldn't get requested number of channels (%d), fallback "
|
||||
"to %s.\n", req, mp_chmap_to_str(&ao->channels));
|
||||
}
|
||||
|
||||
// Some ALSA drivers have broken delay reporting, so disable the ALSA
|
||||
|
Loading…
Reference in New Issue
Block a user