
/// 计算声网SDK返回的用户音量
class CountMicrophoneVolume {

  static double getVolume(int volume){
    var resultVolume = 0.0;
    if(volume == 0){
      resultVolume = 0;
    }else if(volume > 0 && volume < 200){
      resultVolume = volume / 200;
    }else{
      resultVolume = 1;
    }
    return resultVolume;
  }

}