gui: Combine open_stat_pipe() and para_open_stat_pipe().
[paraslash.git] / wmadec_filter.c
index 1233996284f231d9855e7c14954fb77d317816f9..96fb50082d2bff52ba082904341851048c66c6ef 100644 (file)
@@ -1210,13 +1210,13 @@ static int wmadec_execute(struct btr_node *btrn, const char *cmd, char **result)
 
        if (!strcmp(cmd, "samplerate")) {
                if (pwd->ahi.sample_rate == 0)
-                       return -ERRNO_TO_PARA_ERROR(ENAVAIL);
+                       return -E_BTR_NAVAIL;
                *result = make_message("%u", pwd->ahi.sample_rate);
                return 1;
        }
        if (!strcmp(cmd, "channels")) {
                if (pwd->ahi.channels == 0)
-                       return -ERRNO_TO_PARA_ERROR(ENAVAIL);
+                       return -E_BTR_NAVAIL;
                *result = make_message("%u", pwd->ahi.channels);
                return 1;
        }
@@ -1255,11 +1255,12 @@ next_buffer:
                        fn->min_iqs += 4096;
                        goto next_buffer;
                }
-               fn->min_iqs = WMA_FRAME_SKIP + pwd->ahi.block_align;
+               fn->min_iqs = 2 * (WMA_FRAME_SKIP + pwd->ahi.block_align);
                fn->private_data = pwd;
                converted = pwd->ahi.header_len;
                goto success;
        }
+       fn->min_iqs = WMA_FRAME_SKIP + pwd->ahi.block_align;
        for (;;) {
                char *out;
                int out_size = WMA_OUTPUT_BUFFER_SIZE;