From 94e82bcdb82dfedbb01978a68204c7ecd24d6b6c Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 14 Mar 2017 18:06:17 +0100 Subject: 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. --- audio/out/ao_alsa.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'audio') diff --git a/audio/out/ao_alsa.c b/audio/out/ao_alsa.c index e2f9130f98..f7f9a1a555 100644 --- a/audio/out/ao_alsa.c +++ b/audio/out/ao_alsa.c @@ -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; } -- cgit v1.2.3