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

Method ReadFloat32s

internal/mux/mux.go:141–156  ·  view source on GitHub ↗

ReadFloat32s fills buf with the multiplexed data of the players as float32 values.

(buf []float32)

Source from the content-addressed store, hash-verified

139
140// ReadFloat32s fills buf with the multiplexed data of the players as float32 values.
141func (m *Mux) ReadFloat32s(buf []float32) {
142 m.cond.L.Lock()
143 players := make([]*playerImpl, 0, len(m.players))
144 for p := range m.players {
145 players = append(players, p)
146 }
147 m.cond.L.Unlock()
148
149 for i := range buf {
150 buf[i] = 0
151 }
152 for _, p := range players {
153 p.readBufferAndAdd(buf)
154 }
155 m.cond.Signal()
156}
157
158type Player struct {
159 p *playerImpl

Callers 8

oto_OnReadCallbackFunction · 0.80
newContextFunction · 0.80
loopMethod · 0.80
writeOnRenderThreadMethod · 0.80
restartMethod · 0.80
appendBufferMethod · 0.80
readAndWriteMethod · 0.80
appendBuffersMethod · 0.80

Calls 1

readBufferAndAddMethod · 0.80

Tested by

no test coverage detected