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

Function newContext

driver_android.go:26–37  ·  view source on GitHub ↗
(sampleRate int, channelCount int, format mux.Format, bufferSizeInBytes int)

Source from the content-addressed store, hash-verified

24}
25
26func newContext(sampleRate int, channelCount int, format mux.Format, bufferSizeInBytes int) (*context, chan struct{}, error) {
27 ready := make(chan struct{})
28 close(ready)
29
30 c := &context{
31 mux: mux.New(sampleRate, channelCount, format),
32 }
33 if err := oboe.Play(sampleRate, channelCount, c.mux.ReadFloat32s, bufferSizeInBytes); err != nil {
34 return nil, nil, err
35 }
36 return c, ready, nil
37}
38
39func (c *context) Suspend() error {
40 return oboe.Suspend()

Callers

nothing calls this directly

Calls 2

NewFunction · 0.92
PlayFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…