commit 5c3a17fdc67f0cd079e3a11736c21f63fd783e08
parent 53145851013f976d963fc9eb820f1cc2afc9e5a4
Author: sin <sin@2f30.org>
Date: Sat, 27 Dec 2014 11:34:38 +0000
Just call openoutput()
Diffstat:
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/output.c b/output.c
@@ -32,7 +32,7 @@ openoutput(const char *name)
int i;
for (i = 0; i < LEN(outputs); i++) {
- if (outputs[i].enabled)
+ if (!outputs[i].enabled)
continue;
if (strcmp(outputs[i].name, name))
continue;
@@ -48,14 +48,9 @@ openoutputs(void)
{
int i, r = 0;
- for (i = 0; i < LEN(outputs); i++) {
- if (!outputs[i].enabled)
- continue;
- if (outputs[i].output->open(outputs[i].bits,
- outputs[i].rate,
- outputs[i].channels) < 0)
+ for (i = 0; i < LEN(outputs); i++)
+ if (openoutput(outputs[i].name) < 0)
r = -1;
- }
return r;
}