(s *discordgo.VoiceConnection)
| 126 | } |
| 127 | |
| 128 | func 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 | } |
no test coverage detected