From 03942292f55baf5f5990815d966213745a06dd46 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sun, 31 Dec 2017 00:14:52 +0900 Subject: [PATCH] audio/internal/convert: Change the window smaller for performance On iOS, resapling performance was not good. --- audio/internal/convert/resampling.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/audio/internal/convert/resampling.go b/audio/internal/convert/resampling.go index 88b1b2315..74fa888e4 100644 --- a/audio/internal/convert/resampling.go +++ b/audio/internal/convert/resampling.go @@ -127,10 +127,7 @@ func (r *Resampling) src(i int) (float64, float64, error) { } func (r *Resampling) at(t int64) (float64, float64, error) { - windowSize := 8.0 - if web.IsBrowser() { - windowSize = 4.0 - } + windowSize := 4.0 tInSrc := float64(t) * float64(r.from) / float64(r.to) startN := tInSrc - windowSize if startN < 0 {