comparison libaf/af_delay.c @ 36395:2b9bc3c2933d

Remove some macros and switch to libavutil equivalents.
author reimar
date Sat, 26 Oct 2013 09:36:23 +0000
parents a93891202051
children
comparison
equal deleted inserted replaced
36394:2f815fdd521c 36395:2b9bc3c2933d
23 #include <stdio.h> 23 #include <stdio.h>
24 #include <stdlib.h> 24 #include <stdlib.h>
25 #include <string.h> 25 #include <string.h>
26 #include <inttypes.h> 26 #include <inttypes.h>
27 27
28 #include "libavutil/common.h"
28 #include "mp_msg.h" 29 #include "mp_msg.h"
29 #include "af.h" 30 #include "af.h"
30 31
31 #define L 65536 32 #define L 65536
32 33
85 if(AF_OK != af_from_ms(AF_NCH, arg, s->wi, af->data->rate, 0.0, 1000.0)) 86 if(AF_OK != af_from_ms(AF_NCH, arg, s->wi, af->data->rate, 0.0, 1000.0))
86 return AF_ERROR; 87 return AF_ERROR;
87 s->ri = 0; 88 s->ri = 0;
88 for(i=0;i<AF_NCH;i++){ 89 for(i=0;i<AF_NCH;i++){
89 mp_msg(MSGT_AFILTER, MSGL_DBG2, "[delay] Channel %i delayed by %0.3fms\n", 90 mp_msg(MSGT_AFILTER, MSGL_DBG2, "[delay] Channel %i delayed by %0.3fms\n",
90 i,clamp(s->d[i],0.0,1000.0)); 91 i,av_clipf(s->d[i],0.0,1000.0));
91 mp_msg(MSGT_AFILTER, MSGL_DBG3, "[delay] Channel %i delayed by %i samples\n", 92 mp_msg(MSGT_AFILTER, MSGL_DBG3, "[delay] Channel %i delayed by %i samples\n",
92 i,s->wi[i]); 93 i,s->wi[i]);
93 } 94 }
94 return AF_OK; 95 return AF_OK;
95 } 96 }