Documentation ¶
Overview ¶
Package dgvoice provides opus encoding and audio file playback for the Discordgo package.
Index ¶
- Variables
- func IsThisThingOn() bool
- func KillPlayer()
- func PlayAudioFile(v *discordgo.VoiceConnection, filename string, s *discordgo.Session) (err error)
- func ReceivePCM(v *discordgo.VoiceConnection, c chan *discordgo.Packet)
- func SendPCM(v *discordgo.VoiceConnection, pcm <-chan []int16)
- type StreamingSession
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func IsThisThingOn ¶
func IsThisThingOn() bool
func KillPlayer ¶
func KillPlayer()
KillPlayer forces the player to stop by killing the ffmpeg cmd process this method may be removed later in favor of using chans or bools to request a stop.
func PlayAudioFile ¶
PlayAudioFile will play the given filename to the already connected Discord voice server/channel. voice websocket and udp socket must already be setup before this will work.
func ReceivePCM ¶
func ReceivePCM(v *discordgo.VoiceConnection, c chan *discordgo.Packet)
ReceivePCM will receive on the the Discordgo OpusRecv channel and decode the opus audio into PCM then send it on the provided channel.
func SendPCM ¶
func SendPCM(v *discordgo.VoiceConnection, pcm <-chan []int16)
SendPCM will receive on the provied channel encode received PCM data into Opus then send that to Discordgo
Types ¶
type StreamingSession ¶
Click to show internal directories.
Click to hide internal directories.