X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fapiexample.c;h=11cc1559dae8af0e3aa2cda544a0fa01fffea46b;hb=5f621dd28aa8c7c71edc97c2867cacde346af353;hp=793cfaa04072804d7d36072e19a6d10e08befbea;hpb=c9823f05778ca197681a6c9960590d66816ddcfe;p=ffmpeg diff --git a/libavcodec/apiexample.c b/libavcodec/apiexample.c index 793cfaa0407..11cc1559dae 100644 --- a/libavcodec/apiexample.c +++ b/libavcodec/apiexample.c @@ -30,15 +30,13 @@ #include #include #include -#include - -#define PI 3.14159265358979323846 #ifdef HAVE_AV_CONFIG_H #undef HAVE_AV_CONFIG_H #endif #include "avcodec.h" +#include "libavutil/mathematics.h" #define INBUF_SIZE 4096 @@ -91,7 +89,7 @@ void audio_encode_example(const char *filename) /* encode a single tone sound */ t = 0; - tincr = 2 * PI * 440.0 / c->sample_rate; + tincr = 2 * M_PI * 440.0 / c->sample_rate; for(i=0;i<200;i++) { for(j=0;j