]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
av_resample_compensate() doxy
authormichael <michael@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Fri, 12 Nov 2004 02:05:26 +0000 (02:05 +0000)
committermichael <michael@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Fri, 12 Nov 2004 02:05:26 +0000 (02:05 +0000)
git-svn-id: file:///var/local/repositories/ffmpeg/trunk@3671 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

libavcodec/resample2.c

index c41f6e13a25dd1e11bc791da597cf36fae503502..baa6a50864feb5a300c214ec602236cad4f0f85a 100644 (file)
@@ -159,6 +159,18 @@ void av_resample_close(AVResampleContext *c){
     av_freep(&c);
 }
 
+/**
+ * Compensates samplerate/timestamp drift. The compensation is done by changing
+ * the resampler parameters, so no audible clicks or similar distortions ocur
+ * @param compensation_distance distance in output samples over which the compensation should be performed
+ * @param sample_delta number of output samples which should be output less
+ *
+ * example: av_resample_compensate(c, 10, 500)
+ * here instead of 510 samples only 500 samples would be output
+ *
+ * note, due to rounding the actual compensation might be slightly different, 
+ * especially if the compensation_distance is large and the in_rate used during init is small
+ */
 void av_resample_compensate(AVResampleContext *c, int sample_delta, int compensation_distance){
 //    sample_delta += (c->ideal_dst_incr - c->dst_incr)*(int64_t)c->compensation_distance / c->ideal_dst_incr;
     c->compensation_distance= compensation_distance;