Revision 9b2bb403

View differences:

libavcodec/apiexample.c
32 32
#include <string.h>
33 33
#include <math.h>
34 34

  
35
#define PI 3.14159265358979323846
36

  
35 37
#ifdef HAVE_AV_CONFIG_H
36 38
#undef HAVE_AV_CONFIG_H
37 39
#endif
......
89 91

  
90 92
    /* encode a single tone sound */
91 93
    t = 0;
92
    tincr = 2 * M_PI * 440.0 / c->sample_rate;
94
    tincr = 2 * PI * 440.0 / c->sample_rate;
93 95
    for(i=0;i<200;i++) {
94 96
        for(j=0;j<frame_size;j++) {
95 97
            samples[2*j] = (int)(sin(t) * 10000);

Also available in: Unified diff