diff --git a/Makefile.am b/Makefile.am
index 0e4f4a6..6d812dc 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -12,7 +12,7 @@ bin_PROGRAMS = bin/sndfile-generate-chirp bin/sndfile-spectrogram \
 	bin/sndfile-waveform
 
 # Test programs or programs not yet working.
-noinst_PROGRAMS = tests/kaiser_window_test tests/common_tests
+noinst_PROGRAMS = tests/common_tests
 
 AM_CPPFLAGS = $(SNDFILE_CFLAGS) $(FFTW3_CFLAGS) $(CAIRO_CFLAGS) $(JACK_CFLAGS) \
 			$(SAMPLERATE_CFLAGS)
@@ -47,12 +47,9 @@ bin_sndfile_resample_LDADD = $(SNDFILE_LIBS) $(SAMPLERATE_LIBS)
 #=========================================================================================
 # The make check targets.
 
-tests_kaiser_window_test_SOURCES = tests/kaiser_window_test.c src/window.h src/window.c
-
 tests_common_tests_SOURCES = tests/common_tests.c src/common.c src/common.h
 tests_common_tests_LDADD = $(SNDFILE_LIBS) $(FFTW3_LIBS)
 
 check : $(noinst_PROGRAMS) $(bin_PROGRAMS)
 	@$(top_builddir)/tests/common_tests
-	@$(top_builddir)/tests/kaiser_window_test
 	@$(top_srcdir)/tests/valgrind-test.sh
diff --git a/src/spectrogram.c b/src/spectrogram.c
index 0118e1e..6fcb3bf 100644
--- a/src/spectrogram.c
+++ b/src/spectrogram.c
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 2007-2012 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 2007-2015 Erik de Castro Lopo <erikd@mega-nerd.com>
 **
 ** This program is free software: you can redistribute it and/or modify
 ** it under the terms of the GNU General Public License as published by
@@ -189,7 +189,7 @@ apply_window (double * data, int datalen)
 			} ;
 		window_len = datalen ;
 
-		calc_kaiser_window (window, datalen, 20.0) ;
+		calc_hanning_window (window, datalen) ;
 		} ;
 
 	for (k = 0 ; k < datalen ; k++)
diff --git a/src/window.c b/src/window.c
index 848cde0..66e2e29 100644
--- a/src/window.c
+++ b/src/window.c
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 2007-2011 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 2007-2015 Erik de Castro Lopo <erikd@mega-nerd.com>
 **
 ** This program is free software: you can redistribute it and/or modify
 ** it under the terms of the GNU General Public License as published by
@@ -24,126 +24,19 @@
 
 #define ARRAY_LEN(x)		((int) (sizeof (x) / sizeof (x [0])))
 
-
-static double besseli0 (double x) ;
-static double factorial (int k) ;
-
-void
-calc_kaiser_window (double * data, int datalen, double beta)
-{
-	/*
-	**          besseli0 (beta * sqrt (1- (2*x/N).^2))
-	** w (x) =  --------------------------------------,  -N/2 <= x <= N/2
-	**                 besseli0 (beta)
-	*/
-
-	double two_n_on_N, denom ;
-	int k ;
-
-	denom = besseli0 (beta) ;
-
-	if (! isfinite (denom))
-	{	printf ("besseli0 (%f) : %f\nExiting\n", beta, denom) ;
-		exit (1) ;
-		} ;
-
-	for (k = 0 ; k < datalen ; k++)
-	{	double n = k + 0.5 - 0.5 * datalen ;
-		two_n_on_N = (2.0 * n) / datalen ;
-		data [k] = besseli0 (beta * sqrt (1.0 - two_n_on_N * two_n_on_N)) / denom ;
-		} ;
-
-	return ;
-} /* calc_kaiser_window */
-
 void
-calc_nuttall_window (double * data, int datalen)
+calc_hanning_window (double * data, int datalen)
 {
-	const double a [4] = { 0.355768, 0.487396, 0.144232, 0.012604 } ;
 	int k ;
 
 	/*
-	**	Nuttall window function from :
+	**	Hanning window function from :
 	**
 	**	http://en.wikipedia.org/wiki/Window_function
 	*/
 
 	for (k = 0 ; k < datalen ; k++)
-	{	double scale ;
-
-		scale = M_PI * k / (datalen - 1) ;
-
-		data [k] = a [0] - a [1] * cos (2.0 * scale) + a [2] * cos (4.0 * scale) - a [3] * cos (6.0 * scale) ;
-		} ;
+		data [k] = 0.5 * (1.0 - cos(2.0 * M_PI * k / (datalen - 1)));
 
 	return ;
-} /* calc_nuttall_window */
-
-/*==============================================================================
-*/
-
-static double
-besseli0 (double x)
-{	int k ;
-	double result = 0.0 ;
-
-	for (k = 1 ; k < 25 ; k++)
-	{	double temp ;
-
-		temp = pow (0.5 * x, k) / factorial (k) ;
-		result += temp * temp ;
-		} ;
-
-	return 1.0 + result ;
-} /* besseli0 */
-
-static double
-factorial (int val)
-{	static double memory [64] = { 1.0 } ;
-	static int have_entry = 0 ;
-
-	int k ;
-
-	if (val < 0)
-	{	printf ("Oops : val < 0.\n") ;
-		exit (1) ;
-		} ;
-
-	if (val > ARRAY_LEN (memory))
-	{	printf ("Oops : val > ARRAY_LEN (memory).\n") ;
-		exit (1) ;
-		} ;
-
-	if (val < have_entry)
-		return memory [val] ;
-
-	for (k = have_entry + 1 ; k <= val ; k++)
-		memory [k] = k * memory [k - 1] ;
-
-	return memory [val] ;
-} /* factorial */
-
-/*==============================================================================
-*/
-
-static void init_test (void) __attribute__ ((constructor)) ;
-
-static void
-init_test (void)
-{
-	/* puts (__func__) ;*/
-
-	assert (factorial (0) == 1.0) ;
-	assert (factorial (2) == 2.0) ;
-	assert (factorial (0) == 1.0) ;
-	assert (factorial (5) == 120.0) ;
-	assert (factorial (8) == 40320.0) ;
-
-	assert (fabs (besseli0 (0.0) - 1.0) < 1e-8) ;
-	assert (fabs (besseli0 (0.5) - 1.06348337074132) < 1e-8) ;
-	assert (fabs (besseli0 (1.0) - 1.26606587775201) < 1e-14) ;
-	assert (fabs (besseli0 (2.0) - 2.27958530233607) < 1e-14) ;
-	assert (fabs (besseli0 (3.5) - 7.37820343222548) < 1e-14) ;
-
-} /* init_test */
-
+} /* calc_hanning_window */
diff --git a/src/window.h b/src/window.h
index e7227aa..d5edfb2 100644
--- a/src/window.h
+++ b/src/window.h
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 2007-2011 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 2007-2015 Erik de Castro Lopo <erikd@mega-nerd.com>
 **
 ** This program is free software: you can redistribute it and/or modify
 ** it under the terms of the GNU General Public License as published by
@@ -15,6 +15,4 @@
 ** along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-void calc_kaiser_window (double * data, int datalen, double beta) ;
-
-void calc_nuttall_window (double * data, int datalen) ;
+void calc_hanning_window (double * data, int datalen) ;
diff --git a/tests/kaiser_window_test.c b/tests/kaiser_window_test.c
deleted file mode 100644
index 42503ab..0000000
--- a/tests/kaiser_window_test.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
-** Copyright (C) 2007-2013 Erik de Castro Lopo <erikd@mega-nerd.com>
-**
-** This program is free software: you can redistribute it and/or modify
-** it under the terms of the GNU General Public License as published by
-** the Free Software Foundation, either version 2 or version 3 of the
-** License.
-**
-** This program 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 General Public License for more details.
-**
-** You should have received a copy of the GNU General Public License
-** along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-
-#include <src/window.h>
-
-#define ARRAY_LEN(x)	((int) ((sizeof (x)) / (sizeof (x [0]))))
-
-int
-main (void)
-{
-	double window [2000] ;
-	int k ;
-
-	printf ("%-37s : ", "kaiser_window_test") ;
-	fflush (stdout) ;
-
-	calc_kaiser_window (window, ARRAY_LEN (window), 1.0) ;
-
-	for (k = 0 ; k < ARRAY_LEN (window) ; k++)
-	{	if (window [k] > 1.0)
-		{	printf ("\nError (%s %d) : window [%d] > 1.0.\n", __func__, __LINE__, k) ;
-			exit (1) ;
-			} ;
-
-		if (window [k] < 0.0)
-		{	printf ("\nError (%s %d) : window [%d] < 0.0.\n", __func__, __LINE__, k) ;
-			exit (1) ;
-			} ;
-		} ;
-
-	if (fabs (window [0] - window [ARRAY_LEN (window) - 1]) > 1e-20)
-	{	printf ("\nError (%s %d) : fabs (%f - %f) > 1e-20)\n", __func__, __LINE__, window [0], window [ARRAY_LEN (window) - 1]) ;
-		exit (1) ;
-		} ;
-
-	calc_kaiser_window (window, ARRAY_LEN (window) - 1, 1.0) ;
-
-	if (fabs (window [0] - window [ARRAY_LEN (window) - 2]) > 1e-20)
-	{	printf ("\nError (%s %d) : fabs (%f - %f) > 1e-20)\n", __func__, __LINE__, window [0], window [ARRAY_LEN (window) - 1]) ;
-		exit (1) ;
-		} ;
-
-	puts ("ok") ;
-
-	return 0 ;
-} /* main */
