Re: [LAD] [ANN] LV2 beta3

From: Robin Gareus <robin@email-addr-hidden>
Date: Fri May 11 2007 - 15:55:09 EEST

Dave Robillard wrote:
>
> Can we figure out this sample rate thing before this gets really
> ugly? :)
>

Please use rational values. Hardly anyone ever resamples to an
irrational number and it's also needed to do proper A/V sync.

While it's true that most real-life applications will be happy with a
(double) - it can not guarantee exactness and most (double)-precision
bugs are hard to trace/detect in the source.

ffmpeg provides a simple API - see their `rational.h`

static inline double av_q2d(AVRational a){
    return a.num / (double) a.den;
}

2c,
robin
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/mailman/listinfo.cgi/linux-audio-dev
Received on Fri May 11 16:15:03 2007

This archive was generated by hypermail 2.1.8 : Fri May 11 2007 - 16:15:03 EEST