/******************************************************************** * * * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * * PLEASE READ THESE TERMS DISTRIBUTING. * * * * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * * by Monty and The XIPHOPHORUS Company * * http://www.xiph.org/ * * * ******************************************************************** function: window functions last mod: $Id: window.c,v 1.2 2001/08/01 16:26:54 jmvalin Exp $ ********************************************************************/ #include #include #include "window.h" //#include "os.h" //#include "misc.h" //@implements MDCT double *_vorbis_window(int type, int window,int left,int right){ double *ret=calloc(window,sizeof(double)); switch(type){ case 0: /* The 'vorbis window' (window 0) is sin(sin(x)*sin(x)*2pi) */ { int leftbegin=window/4-left/2; int rightbegin=window-window/4-right/2; int i; for(i=0;i