1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-27 09:32:40 +00:00

ao_alsa: fix device filtering, add another exception

The "return false;" was debugging code.

In addition, filter a plain "default", because it's not going to do
anything interesting and just looks ugly.
This commit is contained in:
wm4 2017-03-14 18:06:17 +01:00
parent d606b6af17
commit 94e82bcdb8

View File

@ -1143,7 +1143,6 @@ alsa_error:
static bool is_useless_device(char *name)
{
return false;
char *crap[] = {"rear", "center_lfe", "side", "pulse", "null", "dsnoop", "hw"};
for (int i = 0; i < MP_ARRAY_SIZE(crap); i++) {
int l = strlen(crap[i]);
@ -1151,6 +1150,9 @@ static bool is_useless_device(char *name)
(!name[l] || name[l] == ':'))
return true;
}
// The standard default entry will achieve exactly the same.
if (name && strcmp(name, "default") == 0)
return true;
return false;
}