:github_url: hide .. _class_AudioEffectLimiter: AudioEffectLimiter ================== **已弃用:** Use :ref:`AudioEffectHardLimiter` instead. **继承:** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 为音频总线添加一个软剪辑限制器音频效果。 .. rst-class:: classref-introduction-group 描述 ---- 限制器类似于压缩器,但灵活性较差,并且设计为不允许声音超过给定的 dB 阈值。始终建议在主总线中添加一个以减少削波的影响。 软削波开始将峰值降低到略低于阈值水平,并随着输入水平的增加而逐渐增强其效果,从而永不超过阈值。 .. rst-class:: classref-introduction-group 教程 ---- - :doc:`音频总线 <../tutorials/audio/audio_buses>` .. rst-class:: classref-reftable-group 属性 ---- .. table:: :widths: auto +---------------------------+---------------------------------------------------------------------------+----------+ | :ref:`float` | :ref:`ceiling_db` | ``-0.1`` | +---------------------------+---------------------------------------------------------------------------+----------+ | :ref:`float` | :ref:`soft_clip_db` | ``2.0`` | +---------------------------+---------------------------------------------------------------------------+----------+ | :ref:`float` | :ref:`soft_clip_ratio` | ``10.0`` | +---------------------------+---------------------------------------------------------------------------+----------+ | :ref:`float` | :ref:`threshold_db` | ``0.0`` | +---------------------------+---------------------------------------------------------------------------+----------+ .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group 属性说明 -------- .. _class_AudioEffectLimiter_property_ceiling_db: .. rst-class:: classref-property :ref:`float` **ceiling_db** = ``-0.1`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_ceiling_db**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_ceiling_db**\ (\ ) 波形的最大允许值,单位是分贝。数值范围从 -20 到 -0.1。 .. rst-class:: classref-item-separator ---- .. _class_AudioEffectLimiter_property_soft_clip_db: .. rst-class:: classref-property :ref:`float` **soft_clip_db** = ``2.0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_soft_clip_db**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_soft_clip_db**\ (\ ) 将增益应用于被限制的波,以分贝为单位。取值范围是 0 到 6。 .. rst-class:: classref-item-separator ---- .. _class_AudioEffectLimiter_property_soft_clip_ratio: .. rst-class:: classref-property :ref:`float` **soft_clip_ratio** = ``10.0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_soft_clip_ratio**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_soft_clip_ratio**\ (\ ) .. container:: contribute There is currently no description for this property. Please help us by `contributing one `__! .. rst-class:: classref-item-separator ---- .. _class_AudioEffectLimiter_property_threshold_db: .. rst-class:: classref-property :ref:`float` **threshold_db** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_threshold_db**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_threshold_db**\ (\ ) 限制器开始生效的阈值,以分贝为单位。值的范围可以从 -30 到 0。 .. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` .. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (本方法无副作用,不会修改该实例的任何成员变量。)` .. |vararg| replace:: :abbr:`vararg (本方法除了能接受在此处描述的参数外,还能够继续接受任意数量的参数。)` .. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` .. |static| replace:: :abbr:`static (调用本方法无需实例,可直接使用类名进行调用。)` .. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效运算符。)` .. |bitfield| replace:: :abbr:`BitField (这个值是由下列位标志构成位掩码的整数。)` .. |void| replace:: :abbr:`void (无返回值。)`