mirror of
https://github.com/stryan/mumble-discord-bridge.git
synced 2024-11-23 05:45:41 -05:00
integrate mutex fix
This commit is contained in:
parent
645c7676c1
commit
ab1046838c
@ -183,6 +183,8 @@ func discordReceivePCM(v *discordgo.VoiceConnection, die chan bool) {
|
|||||||
case fromDiscordMap[p.SSRC].pcm <- p.PCM[0:480]:
|
case fromDiscordMap[p.SSRC].pcm <- p.PCM[0:480]:
|
||||||
default:
|
default:
|
||||||
log.Println("fromDiscordMap buffer full. Dropping packet")
|
log.Println("fromDiscordMap buffer full. Dropping packet")
|
||||||
|
discordMutex.Unlock()
|
||||||
|
continue
|
||||||
}
|
}
|
||||||
select {
|
select {
|
||||||
case fromDiscordMap[p.SSRC].pcm <- p.PCM[480:960]:
|
case fromDiscordMap[p.SSRC].pcm <- p.PCM[480:960]:
|
||||||
|
8
main.go
8
main.go
@ -54,10 +54,10 @@ func main() {
|
|||||||
if *mode == "" {
|
if *mode == "" {
|
||||||
log.Fatalln("missing mode set")
|
log.Fatalln("missing mode set")
|
||||||
}
|
}
|
||||||
err := syscall.Setpriority(syscall.PRIO_PROCESS, os.Getpid(), -5)
|
//err := syscall.Setpriority(syscall.PRIO_PROCESS, os.Getpid(), -5)
|
||||||
if err != nil {
|
//if err != nil {
|
||||||
log.Println("Unable to set priority. ", err)
|
// log.Println("Unable to set priority. ", err)
|
||||||
}
|
//}
|
||||||
|
|
||||||
// DISCORD Setup
|
// DISCORD Setup
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user