Renamed Opus chan to OpusSend and added OpusRecv
This commit is contained in:
parent
ec52ad0a8d
commit
b4b144edb3
1 changed files with 4 additions and 3 deletions
7
voice.go
7
voice.go
|
@ -32,7 +32,8 @@ type Voice struct {
|
||||||
Ready bool // If true, voice is ready to send/receive audio
|
Ready bool // If true, voice is ready to send/receive audio
|
||||||
Debug bool // If true, print extra logging
|
Debug bool // If true, print extra logging
|
||||||
OP2 *voiceOP2 // exported for dgvoice, may change.
|
OP2 *voiceOP2 // exported for dgvoice, may change.
|
||||||
Opus chan []byte // Chan for sending opus audio
|
OpusSend chan []byte // Chan for sending opus audio
|
||||||
|
OpusRecv chan []byte // Chan for receiving opus audio
|
||||||
// FrameRate int // This can be used to set the FrameRate of Opus data
|
// FrameRate int // This can be used to set the FrameRate of Opus data
|
||||||
// FrameSize int // This can be used to set the FrameSize of Opus data
|
// FrameSize int // This can be used to set the FrameSize of Opus data
|
||||||
|
|
||||||
|
@ -185,8 +186,8 @@ func (v *Voice) wsEvent(messageType int, message []byte) {
|
||||||
|
|
||||||
// Start the opusSender.
|
// Start the opusSender.
|
||||||
// TODO: Should we allow 48000/960 values to be user defined?
|
// TODO: Should we allow 48000/960 values to be user defined?
|
||||||
v.Opus = make(chan []byte, 2)
|
v.OpusSend = make(chan []byte, 2)
|
||||||
go v.opusSender(v.Opus, 48000, 960)
|
go v.opusSender(v.OpusSend, 48000, 960)
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue