mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-06 09:56:09 +00:00
Update copyright year to 2017.
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
"""
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015-2016 Rapptz
|
||||
Copyright (c) 2015-2017 Rapptz
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
@ -238,7 +238,7 @@ class Encoder:
|
||||
if ret < 0:
|
||||
log.info('error has happened in set_bandwidth')
|
||||
raise OpusError(ret)
|
||||
|
||||
|
||||
def set_signal_type(self, req):
|
||||
if req not in signal_ctl:
|
||||
raise KeyError('%r is not a valid signal setting. Try one of: %s' % (req, ','.join(signal_ctl)))
|
||||
@ -252,14 +252,14 @@ class Encoder:
|
||||
|
||||
def set_fec(self, enabled=True):
|
||||
ret = _lib.opus_encoder_ctl(self._state, CTL_SET_FEC, 1 if enabled else 0)
|
||||
|
||||
|
||||
if ret < 0:
|
||||
log.info('error has happened in set_fec')
|
||||
raise OpusError(ret)
|
||||
|
||||
|
||||
def set_expected_packet_loss_percent(self, percentage):
|
||||
ret = _lib.opus_encoder_ctl(self._state, CTL_SET_PLP, min(100, max(0, int(percentage * 100))))
|
||||
|
||||
|
||||
if ret < 0:
|
||||
log.info('error has happened in set_expected_packet_loss_percent')
|
||||
raise OpusError(ret)
|
||||
|
Reference in New Issue
Block a user