changeset 7572:d72f9295fe6e libavcodec

Change wma.c to use the ff_sine_window_init() from mdct.c
author superdump
date Thu, 14 Aug 2008 14:36:22 +0000
parents 58f6bb760994
children 7802295cae6f
files wma.c
diffstat 1 files changed, 2 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/wma.c	Thu Aug 14 05:52:29 2008 +0000
+++ b/wma.c	Thu Aug 14 14:36:22 2008 +0000
@@ -301,14 +301,10 @@
 
     /* init MDCT windows : simple sinus window */
     for(i = 0; i < s->nb_block_sizes; i++) {
-        int n, j;
-        float alpha;
+        int n;
         n = 1 << (s->frame_len_bits - i);
         window = av_malloc(sizeof(float) * n);
-        alpha = M_PI / (2.0 * n);
-        for(j=0;j<n;j++) {
-            window[j] = sin((j + 0.5) * alpha);
-        }
+        ff_sine_window_init(window, n);
         s->windows[i] = window;
     }