void sample_dump(int fnum, int32_t *tab, int n)

{

    static FILE *files[16], *f;

    char buf[512];

    int i;

    int32_t v;

    

    f = files[fnum];

    if (!f) {

        snprintf(buf, sizeof(buf), "/tmp/out%d.%s.pcm", 

                fnum, 

#ifdef USE_HIGHPRECISION

                "hp"

#else

                "lp"

#endif

                );

        f = fopen(buf, "w");

        if (!f)

            return;

        files[fnum] = f;

    }

    

    if (fnum == 0) {

        static int pos = 0;

        printf("pos=%d\n", pos);

        for(i=0;i<n;i++) {

            printf(" %0.4f", (double)tab[i] / FRAC_ONE);

            if ((i % 18) == 17)

                printf("\n");

        }

        pos += n;

    }

    for(i=0;i<n;i++) {

        /* normalize to 23 frac bits */

        v = tab[i] << (23 - FRAC_BITS);

        fwrite(&v, 1, sizeof(int32_t), f);

    }

}

void sample_dump(int fnum, int32_t *tab, int n)

{

    static FILE *files[16], *f;

    char buf[512];

    int i;

    int32_t v;

    

    f = files[fnum];

    if (!f) {

        snprintf(buf, sizeof(buf), "/tmp/out%d.%s.pcm", 

                fnum, 

#ifdef USE_HIGHPRECISION

                "hp"

#else

                "lp"

#endif

                );

        f = fopen(buf, "w");

        if (!f)

            return;

        files[fnum] = f;

    }

    

    if (fnum == 0) {

        static int pos = 0;

        printf("pos=%d\n", pos);

        for(i=0;i<n;i++) {

            printf(" %0.4f", (double)tab[i] / FRAC_ONE);

            if ((i % 18) == 17)

                printf("\n");

        }

        pos += n;

    }

    for(i=0;i<n;i++) {

        

        v = tab[i] << (23 - FRAC_BITS);

        fwrite(&v, 1, sizeof(int32_t), f);

    }

}

        printf("pos=%d\n", pos);             printf(" %0.4f", (double)tab[i] / FRAC_ONE);                 printf("\n");
void FUNC_0(int VAR_0, int32_t *VAR_1, int VAR_2)

{

    static FILE *VAR_3[16], *f;

    char VAR_4[512];

    int VAR_5;

    int32_t v;

    

    f = VAR_3[VAR_0];

    if (!f) {

        snprintf(VAR_4, sizeof(VAR_4), "/tmp/out%d.%s.pcm", 

                VAR_0, 

#ifdef USE_HIGHPRECISION

                "hp"

#else

                "lp"

#endif

                );

        f = fopen(VAR_4, "w");

        if (!f)

            return;

        VAR_3[VAR_0] = f;

    }

    

    if (VAR_0 == 0) {

        static int VAR_6 = 0;

        printf("VAR_6=%d\VAR_2", VAR_6);

        for(VAR_5=0;VAR_5<VAR_2;VAR_5++) {

            printf(" %0.4f", (double)VAR_1[VAR_5] / FRAC_ONE);

            if ((VAR_5 % 18) == 17)

                printf("\VAR_2");

        }

        VAR_6 += VAR_2;

    }

    for(VAR_5=0;VAR_5<VAR_2;VAR_5++) {

        

        v = VAR_1[VAR_5] << (23 - FRAC_BITS);

        fwrite(&v, 1, sizeof(int32_t), f);

    }

}

void FUNC_0(int VAR_0, int32_t *VAR_1, int VAR_2)
{ static FILE *VAR_3[16], *f; char VAR_4[512]; int VAR_5; int32_t v; f = VAR_3[VAR_0]; if (!f) { snprintf(VAR_4, sizeof(VAR_4), "/tmp/out%d.%s.pcm",
VAR_0,
#ifdef USE_HIGHPRECISION
"hp"
#else
"lp"
#endif
); f = fopen(VAR_4, "w"); if (!f)
return; VAR_3[VAR_0] = f; } if (VAR_0 == 0) { static int VAR_6 = 0; printf("VAR_6=%d\VAR_2", VAR_6); for(VAR_5=0;VAR_5<VAR_2;VAR_5++) { printf(" %0.4f", (double)VAR_1[VAR_5] / FRAC_ONE); if ((VAR_5 % 18) == 17)
printf("\VAR_2"); } VAR_6 += VAR_2; } for(VAR_5=0;VAR_5<VAR_2;VAR_5++) { v = VAR_1[VAR_5] << (23 - FRAC_BITS); fwrite(&v, 1, sizeof(int32_t), f); } }