mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
audio/internal/go2cpp: Refactoring
This commit is contained in:
parent
52c609459c
commit
9585c1e09a
@ -21,10 +21,6 @@ import (
|
||||
"syscall/js"
|
||||
)
|
||||
|
||||
const (
|
||||
readChunkSize = 4096
|
||||
)
|
||||
|
||||
type Context struct {
|
||||
v js.Value
|
||||
sampleRate int
|
||||
@ -294,6 +290,8 @@ func (p *Player) writeImpl(dst js.Value, src []byte) {
|
||||
}
|
||||
|
||||
func (p *Player) loop() {
|
||||
const readChunkSize = 4096
|
||||
|
||||
buf := make([]byte, readChunkSize)
|
||||
dst := js.Global().Get("Uint8Array").New(readChunkSize)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user