MCPcopy Create free account
hub / github.com/3NailsInfoSec/DCVC2 / playSound

Function playSound

agent.go:128–145  ·  view source on GitHub ↗
(s *discordgo.VoiceConnection)

Source from the content-addressed store, hash-verified

126}
127
128func playSound(s *discordgo.VoiceConnection) {
129 s.Speaking(true)
130 i := 0
131 for _, h := range chunks {
132 tmp = append(tmp, h)
133 for _, chunk := range tmp {
134 i++
135 size := [][]byte{[]byte(info + delimiter_data)}
136 size_new := bytes.Join(size, nil)
137 size_chunk := chunk_buffer(size_new, 990)
138 new_chunk := append(size_chunk, chunk)
139 a := bytes.Join(new_chunk, nil)
140 s.OpusSend <- a
141 tmp = make([][]byte, 0)
142 }
143 }
144 s.Speaking(false)
145}

Callers 1

handleVoiceFunction · 0.70

Calls 1

chunk_bufferFunction · 0.70

Tested by

no test coverage detected