Update copyright year to 2017.

This commit is contained in:
Rapptz
2017-01-20 23:19:19 -05:00
parent 4c981ee631
commit ff9f5749e1
44 changed files with 49 additions and 49 deletions

View File

@ -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)