mirror of
https://github.com/stryan/mumble-discord-bridge.git
synced 2024-11-16 20:15:40 -05:00
correct debug message and add timing
This commit is contained in:
parent
910eaa5954
commit
dcc3fd48b4
@ -59,6 +59,7 @@ func (dd *DiscordDuplex) discordSendPCM(ctx context.Context, wg *sync.WaitGroup,
|
||||
|
||||
lastReady := true
|
||||
var readyTimeout *time.Timer
|
||||
var speakingStart time.Time
|
||||
|
||||
wg.Add(1)
|
||||
|
||||
@ -72,7 +73,8 @@ func (dd *DiscordDuplex) discordSendPCM(ctx context.Context, wg *sync.WaitGroup,
|
||||
<-ticker.C
|
||||
if len(pcm) > 1 {
|
||||
if !streaming {
|
||||
log.Panicln("Debug: Discord start speaking")
|
||||
log.Println("Debug: Discord start speaking")
|
||||
speakingStart = time.Now()
|
||||
dd.Bridge.DiscordVoice.Speaking(true)
|
||||
streaming = true
|
||||
}
|
||||
@ -108,7 +110,7 @@ func (dd *DiscordDuplex) discordSendPCM(ctx context.Context, wg *sync.WaitGroup,
|
||||
|
||||
} else {
|
||||
if streaming {
|
||||
log.Panicln("Debug: Discord stop speaking")
|
||||
log.Println("Debug: Discord stop speaking", time.Since(speakingStart).Milliseconds(), "ms")
|
||||
dd.Bridge.DiscordVoice.Speaking(false)
|
||||
streaming = false
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user