X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fapiexample.c;h=151637bd21d7cd43d4125779ed80fd800befcec1;hb=7ca6cc099c7e11413c4e95ca10cc2edbfe1052fd;hp=7fe1c119d40b541bc264ed9f228313d736fa1c27;hpb=115329f16062074e11ccf3b89ead6176606c9696;p=ffmpeg diff --git a/libavcodec/apiexample.c b/libavcodec/apiexample.c index 7fe1c119d40..151637bd21d 100644 --- a/libavcodec/apiexample.c +++ b/libavcodec/apiexample.c @@ -1,3 +1,23 @@ +/* + * copyright (c) 2001 Fabrice Bellard + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + /** * @file apiexample.c * avcodec API use example. @@ -12,6 +32,8 @@ #include #include +#define PI 3.14159265358979323846 + #ifdef HAVE_AV_CONFIG_H #undef HAVE_AV_CONFIG_H #endif @@ -69,7 +91,7 @@ void audio_encode_example(const char *filename) /* encode a single tone sound */ t = 0; - tincr = 2 * M_PI * 440.0 / c->sample_rate; + tincr = 2 * PI * 440.0 / c->sample_rate; for(i=0;i<200;i++) { for(j=0;j