setAttenuationModel method Null safety

Future<int?> setAttenuationModel(
  1. {required AttenuationType type,
  2. required double coefficient}
)

设置范围语音的音量衰减模式

衰减模式更改后,RTCRangeAudioObserver.onRangeAudioInfo 回调将根据最后设置的衰减模式进行计算并返回音量衰减数值。

type 音量衰减模式,默认为线性衰减。

coefficient 指数衰减模式下的音量衰减系数,默认值为 1。 范围 0.1,100,推荐设置为 50。 数值越大,音量的衰减速度越快。

返回值:方法调用结果

注意:音量衰减范围通过 RTCRangeAudio.updateReceiveRange 进行设置。

Implementation

Future<int?> setAttenuationModel(
    {required AttenuationType type, required double coefficient});