Unblock sending audio channel, avoid causing stuck (#131)

This commit is contained in:
giongto35 2019-11-21 01:03:50 +08:00 committed by GitHub
parent cda47d5229
commit 7df39def96
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -136,7 +136,10 @@ func audioWrite2(buf unsafe.Pointer, frames C.size_t) C.size_t {
// copy because pcm slice refer to buf underlying pointer, and buf pointer is the same in continuos frames
copy(p, pcm)
NAEmulator.audioChannel <- p
select {
case NAEmulator.audioChannel <- p:
default:
}
return frames
}