mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 03:08:54 +01:00
audio: Bug fix: Avoid blocking when sending buffer
This commit is contained in:
parent
1ca76b64f7
commit
84bf1ddf5c
@ -202,7 +202,7 @@ func NewPlayer(sampleRate, channelNum, bytesPerSample int) (*Player, error) {
|
|||||||
bytesPerSample: bytesPerSample,
|
bytesPerSample: bytesPerSample,
|
||||||
buffer: []byte{},
|
buffer: []byte{},
|
||||||
chErr: make(chan error),
|
chErr: make(chan error),
|
||||||
chBuffer: make(chan []byte),
|
chBuffer: make(chan []byte, 8),
|
||||||
}
|
}
|
||||||
if err := jni.RunOnJVM(func(vm, env, ctx uintptr) error {
|
if err := jni.RunOnJVM(func(vm, env, ctx uintptr) error {
|
||||||
audioTrack := C.jobject(nil)
|
audioTrack := C.jobject(nil)
|
||||||
|
Loading…
Reference in New Issue
Block a user