def _make_divisible(ch, divisor=8, min_ch=None):
时间: 2024-05-19 11:12:51 浏览: 180
en2_src.rar_divisible_模2除法
if min_ch is None:
min_ch = divisor
# make sure that the number of channels is divisible by the divisor
new_ch = max(min_ch, int(ch + divisor / 2) // divisor * divisor)
# if the new number of channels is too small, increase it
if new_ch < 0.9 * ch:
new_ch += divisor
return new_ch
阅读全文