audio: Don't use nosync GopherJS

nosync package is good in terms of performance, but this assumes
that duplicated lock never happens. As audio package runs multiple
goroutines, theoretically duplicated lock can happen, and it looks
like this is an actual case (#603).

This change replaces nosync usages with regular sync usages.

Probably I'll deprecate nosync usages via internal/sync package
everywhere in Ebiten.

This might fix #603.
This commit is contained in:
Hajime Hoshi 2018-05-09 12:14:17 +09:00
parent c22857ca89
commit df048d9bf6

View File

@ -40,13 +40,13 @@ import (
"fmt"
"io"
"runtime"
"sync"
"time"
"github.com/hajimehoshi/oto"
"github.com/hajimehoshi/ebiten/internal/clock"
"github.com/hajimehoshi/ebiten/internal/hooks"
"github.com/hajimehoshi/ebiten/internal/sync"
"github.com/hajimehoshi/ebiten/internal/web"
)