SILK update
[opus.git] / src_FLP / SKP_Silk_apply_sine_window_FLP.c
index 8fcbbe2..17e8f1c 100644 (file)
@@ -29,7 +29,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 \r
 /* Apply sine window to signal vector.                                                                  */\r
 /* Window types:                                                                                        */\r
-/*  0 -> sine window from 0 to pi                                                                       */\r
 /*  1 -> sine window from 0 to pi/2                                                                     */\r
 /*  2 -> sine window from pi/2 to pi                                                                    */\r
 void SKP_Silk_apply_sine_window_FLP(\r
@@ -42,13 +41,12 @@ void SKP_Silk_apply_sine_window_FLP(
     SKP_int   k;\r
     SKP_float freq, c, S0, S1;\r
 \r
+    SKP_assert( win_type == 1 || win_type == 2 );\r
+\r
     /* Length must be multiple of 4 */\r
     SKP_assert( ( length & 3 ) == 0 );\r
 \r
     freq = PI / ( length + 1 );\r
-    if( win_type == 0 ) {\r
-        freq = 2.0f * freq;\r
-    }\r
 \r
     /* Approximation of 2 * cos(f) */\r
     c = 2.0f - freq * freq;\r