From e2858d07c944a650bc6c2eac1a37e7a7845c89c7 Mon Sep 17 00:00:00 2001 From: Niels Martin Hansen Date: Sun, 24 Jun 2007 20:09:18 +0000 Subject: [PATCH] Overlapping FFT's seem to work now. Originally committed to SVN as r1303. --- aegisub/audio_spectrum.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aegisub/audio_spectrum.cpp b/aegisub/audio_spectrum.cpp index 98749bb9e..64c7f9ed7 100644 --- a/aegisub/audio_spectrum.cpp +++ b/aegisub/audio_spectrum.cpp @@ -88,7 +88,7 @@ public: // Both start and end are included in the range stored, so we have end-start+1 elements data.resize(length*overlaps, null_line); - unsigned int overlap_offset = length / overlaps / 2; + unsigned int overlap_offset = line_length / overlaps * 2; // FIXME: the result seems weird/wrong without this factor 2, but why? // Raw sample data short *raw_sample_data = new short[line_length*2];