audio/internal/readerdriver: Bug fix: Invoke onReady for go2cpp

Updates #1599
This commit is contained in:
Hajime Hoshi 2021-04-19 23:59:28 +09:00
parent ea9d64f5b8
commit 146678596b

View File

@ -42,6 +42,7 @@ type contextImpl struct {
func NewContext(sampleRate int, channelNum int, bitDepthInBytes int, onReady func()) (Context, error) {
if js.Global().Get("go2cpp").Truthy() {
defer onReady()
return &go2cppDriverWrapper{go2cpp.NewContext(sampleRate, channelNum, bitDepthInBytes)}, nil
}