Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions gumbleutil/bitrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@ var autoBitrate = &Listener{
interval := e.Client.Config.AudioInterval
dataBytes := (*e.MaximumBitrate / (8 * (int(time.Second/interval) + safety))) - 32 - 10

// If we use default config and specify maximum bitrate of <35000, then we get a negative number
// that is then passed into a make function in opus_nonshared that then panics.
//
// As a hack - let's set a minimum of 6 bytes for AudioDataBytes
// (lowest value that worked in manual testing)
if dataBytes < 6 {
dataBytes = 6
}

e.Client.Config.AudioDataBytes = dataBytes
}
},
Expand Down