From ab1046838c65d2bb8b46e2363e708b53ada177c2 Mon Sep 17 00:00:00 2001 From: Steve Date: Tue, 5 Jan 2021 21:56:37 -0500 Subject: [PATCH] integrate mutex fix --- discord.go | 2 ++ main.go | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/discord.go b/discord.go index 77e2233..462abb7 100644 --- a/discord.go +++ b/discord.go @@ -183,6 +183,8 @@ func discordReceivePCM(v *discordgo.VoiceConnection, die chan bool) { case fromDiscordMap[p.SSRC].pcm <- p.PCM[0:480]: default: log.Println("fromDiscordMap buffer full. Dropping packet") + discordMutex.Unlock() + continue } select { case fromDiscordMap[p.SSRC].pcm <- p.PCM[480:960]: diff --git a/main.go b/main.go index 10dad71..21e2666 100644 --- a/main.go +++ b/main.go @@ -54,10 +54,10 @@ func main() { if *mode == "" { log.Fatalln("missing mode set") } - err := syscall.Setpriority(syscall.PRIO_PROCESS, os.Getpid(), -5) - if err != nil { - log.Println("Unable to set priority. ", err) - } + //err := syscall.Setpriority(syscall.PRIO_PROCESS, os.Getpid(), -5) + //if err != nil { + // log.Println("Unable to set priority. ", err) + //} // DISCORD Setup