Fix a bug in the output of para_audioc.
[paraslash.git] / amp_filter.c
index a88719e33544b4a08e3d74862ee54cf13cae3d19..a62344a1520798787f5698b89db7ec085776ef2e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2008 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2009 Andre Noll <maan@systemlinux.org>
  *
  * Licensed under the GPL v2. For licencing details see COPYING.
  */
@@ -76,11 +76,9 @@ static void amp_open(struct filter_node *fn)
 
        pad->conf = fn->conf;
        fn->private_data = pad;
-       if (!pad->conf->amp_given && stat_item_values[SI_AMPLIFICATION]) {
-               int i = SI_AMPLIFICATION;
-               char *s = stat_item_values[i] + strlen(status_item_list[i]) + 1;
-               sscanf(s, "%u", &pad->amp);
-       } else
+       if (!pad->conf->amp_given && stat_item_values[SI_AMPLIFICATION])
+               sscanf(stat_item_values[SI_AMPLIFICATION], "%u", &pad->amp);
+       else
                pad->amp = pad->conf->amp_arg;
        fn->bufsize = AMP_CHUNK_SIZE;
        fn->buf = para_malloc(fn->bufsize);