(sampleRate int, channelCount int, readFunc func(buf []float32), bufferSizeInBytes int)
| 32 | var theReadFunc func(buf []float32) |
| 33 | |
| 34 | func 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 | |
| 43 | func Suspend() error { |
| 44 | if msg := C.oto_oboe_Suspend(); msg != nil { |
no outgoing calls
no test coverage detected
searching dependent graphs…