mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 03:38:55 +01:00
audio/internal/convert: Change the window smaller for performance
On iOS, resapling performance was not good.
This commit is contained in:
parent
97ec367e23
commit
03942292f5
@ -127,10 +127,7 @@ func (r *Resampling) src(i int) (float64, float64, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (r *Resampling) at(t int64) (float64, float64, error) {
|
func (r *Resampling) at(t int64) (float64, float64, error) {
|
||||||
windowSize := 8.0
|
windowSize := 4.0
|
||||||
if web.IsBrowser() {
|
|
||||||
windowSize = 4.0
|
|
||||||
}
|
|
||||||
tInSrc := float64(t) * float64(r.from) / float64(r.to)
|
tInSrc := float64(t) * float64(r.from) / float64(r.to)
|
||||||
startN := tInSrc - windowSize
|
startN := tInSrc - windowSize
|
||||||
if startN < 0 {
|
if startN < 0 {
|
||||||
|
Loading…
Reference in New Issue
Block a user