diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2008-10-02 16:29:15 +0000 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2008-10-02 16:29:15 +0000 |
commit | 14660b0814fcd080daadf75ddbd0555f36558064 (patch) | |
tree | 8197e5dd5ca73821900f5b91da06f05618ca3e5e | |
parent | 19998314cdb4c83aca39adc058465e06937f20f6 (diff) | |
download | ffmpeg-14660b0814fcd080daadf75ddbd0555f36558064.tar.gz |
Use M_PI from libavutil/mathematics.h instead of defining PI ourselves
in libavcodec/apiexample.c.
Originally committed as revision 15520 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/apiexample.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libavcodec/apiexample.c b/libavcodec/apiexample.c index 793cfaa040..11cc1559da 100644 --- a/libavcodec/apiexample.c +++ b/libavcodec/apiexample.c @@ -30,15 +30,13 @@ #include <stdlib.h> #include <stdio.h> #include <string.h> -#include <math.h> - -#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<frame_size;j++) { samples[2*j] = (int)(sin(t) * 10000); |