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
[email protected]
http://lists.linuxaudio.org/mailman/listinfo.cgi/linux-audio-dev

Reply via email to