Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Play ¶
func Play(vc *discordgo.VoiceConnection, sample_func SampleFunc, skip chan struct{})
This function first connects the bot to voice, and then calls sample_func every 20 millis, until sample_func returns either an error or a nil array. This is a blocking call.
Types ¶
type SampleFunc ¶
This is used in play_audio, and is called once every 20 millis.
func NoteSampler ¶
func NoteSampler(note float64) SampleFunc
This returns a sample_func which plays a constant sin wave, given a note in hz.
func WavSampler ¶
func WavSampler(wav *bytes.Buffer) SampleFunc
Click to show internal directories.
Click to hide internal directories.