Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: LAME resampling bug? (Read 3479 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

LAME resampling bug?

 

And, changing type of lame_internal_flags::resample_ratio variable from FLOAT to double eliminates these lines.

Added: eliminates these lines ...but only for short samples 

 

LAME resampling bug?

Reply #1
Also changed type of variables that are significant for resampling:

util.h:
Code: [Select]
        double   resample_ratio; /* input_samp_rate/output_samp_rate */
...
        double *blackfilt[2 * BPC + 1];
        double   itime[2];

util.c:
Code: [Select]
inline static double blackman(double x, double fcn, int l)

blackman():
Code: [Select]
    double   bkwn, x2;
    double const wcn = (PI * fcn);

fill_buffer_resample():
Code: [Select]
    double   offset, xvalue;
    double   fcn, intratio;
    sample_t  *inbuf_old;
...
            double   sum = 0.;
...
        double   time0;

NOW works. Don't know whether all these changes were nessessary.