MCPcopy Index your code
hub / github.com/EngoEngine/engo / bufferToInt16

Method bufferToInt16

common/audio_player.go:104–112  ·  view source on GitHub ↗
(lengthInBytes int)

Source from the content-addressed store, hash-verified

102}
103
104func (p *Player) bufferToInt16(lengthInBytes int) ([]int16, error) {
105 select {
106 case p.proceedCh <- make([]int16, lengthInBytes/2):
107 r := <-p.proceededCh
108 return r.buf, r.err
109 case <-p.readLoopEndedCh:
110 return nil, fmt.Errorf("audio: the player is already closed")
111 }
112}
113
114// Play plays the player's audio.
115func (p *Player) Play() {

Callers 1

readMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected