Skip to content

Commit

Permalink
Raise max encoder bitrate to 512kbps
Browse files Browse the repository at this point in the history
Any higher is useless for opus anyways.
  • Loading branch information
imayhaveborkedit authored and Rapptz committed Jun 21, 2019
1 parent 94c0cb0 commit 20fa300
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion discord/opus.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ def _create_state(self):
return _lib.opus_encoder_create(self.SAMPLING_RATE, self.CHANNELS, self.application, ctypes.byref(ret))

def set_bitrate(self, kbps):
kbps = min(128, max(16, int(kbps)))
kbps = min(512, max(16, int(kbps)))

_lib.opus_encoder_ctl(self._state, CTL_SET_BITRATE, kbps * 1024)
return kbps
Expand Down

0 comments on commit 20fa300

Please sign in to comment.