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

Function newContext

driver_console.go:49–60  ·  view source on GitHub ↗
(sampleRate int, channelCount int, format mux.Format, bufferSizeInBytes int)

Source from the content-addressed store, hash-verified

47var theContext *context
48
49func newContext(sampleRate int, channelCount int, format mux.Format, bufferSizeInBytes int) (*context, chan struct{}, error) {
50 ready := make(chan struct{})
51 close(ready)
52
53 c := &context{
54 mux: mux.New(sampleRate, channelCount, format),
55 }
56 theContext = c
57 C.oto_OpenAudioProxy(C.int(sampleRate), C.int(channelCount), C.int(bufferSizeInBytes))
58
59 return c, ready, nil
60}
61
62func (c *context) Suspend() error {
63 // Do nothing so far.

Callers

nothing calls this directly

Calls 1

NewFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…