MCPcopy
hub / github.com/ebitengine/oto / Play

Function Play

internal/oboe/binding_android.go:34–41  ·  view source on GitHub ↗
(sampleRate int, channelCount int, readFunc func(buf []float32), bufferSizeInBytes int)

Source from the content-addressed store, hash-verified

32var theReadFunc func(buf []float32)
33
34func Play(sampleRate int, channelCount int, readFunc func(buf []float32), bufferSizeInBytes int) error {
35 // Play can invoke the callback. Set the callback before Play.
36 theReadFunc = readFunc
37 if msg := C.oto_oboe_Play(C.int(sampleRate), C.int(channelCount), C.int(bufferSizeInBytes)); msg != nil {
38 return fmt.Errorf("oboe: Play failed: %s", C.GoString(msg))
39 }
40 return nil
41}
42
43func Suspend() error {
44 if msg := C.oto_oboe_Suspend(); msg != nil {

Callers 1

newContextFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…