forked from pothtonswer/discordmuffin
Moved Voice.Ready = true into opusSender
This commit is contained in:
parent
4b1baec757
commit
7cc7b09957
1 changed files with 4 additions and 1 deletions
5
voice.go
5
voice.go
|
@ -355,7 +355,6 @@ func (v *Voice) udpOpen() (err error) {
|
||||||
go v.udpKeepAlive(5 * time.Second)
|
go v.udpKeepAlive(5 * time.Second)
|
||||||
// TODO: find a way to check that it fired off okay
|
// TODO: find a way to check that it fired off okay
|
||||||
|
|
||||||
v.Ready = true
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -399,6 +398,10 @@ func (v *Voice) opusSender(opus <-chan []byte, rate, size int) {
|
||||||
|
|
||||||
runtime.LockOSThread()
|
runtime.LockOSThread()
|
||||||
|
|
||||||
|
// Voice is now ready to receive audio packets
|
||||||
|
// TODO: this needs reviewed as I think there must be a better way.
|
||||||
|
v.Ready = true
|
||||||
|
|
||||||
var sequence uint16 = 0
|
var sequence uint16 = 0
|
||||||
var timestamp uint32 = 0
|
var timestamp uint32 = 0
|
||||||
udpHeader := make([]byte, 12)
|
udpHeader := make([]byte, 12)
|
||||||
|
|
Loading…
Reference in a new issue