public void ImRecordVolume(object data) { ImRecordVolumeNotify RecordVolumeNotify = data as ImRecordVolumeNotify; Debug.Log("ImRecordVolumeNotify:v_volume=" + RecordVolumeNotify.v_volume); if (RecordVolumeNotify.v_volume == 0) { LuaFramework.Util.CallMethod("TalkCtrl", "showYuYinVolume", 1); } else if (RecordVolumeNotify.v_volume > 0 && RecordVolumeNotify.v_volume < 25) { LuaFramework.Util.CallMethod("TalkCtrl", "showYuYinVolume", 2); } else if (RecordVolumeNotify.v_volume > 25 && RecordVolumeNotify.v_volume < 50) { LuaFramework.Util.CallMethod("TalkCtrl", "showYuYinVolume", 3); } else if (RecordVolumeNotify.v_volume > 50 && RecordVolumeNotify.v_volume < 75) { LuaFramework.Util.CallMethod("TalkCtrl", "showYuYinVolume", 4); } else if (RecordVolumeNotify.v_volume > 75 && RecordVolumeNotify.v_volume < 100) { LuaFramework.Util.CallMethod("TalkCtrl", "showYuYinVolume", 5); } }
/// <summary> /// 录音音量的回调 /// </summary> /// <param name="data"></param> protected static void ImRecordVolume(object data) { ImRecordVolumeNotify RecordVolumeNotify = data as ImRecordVolumeNotify; // NGUIDebug.Log("ImRecordVolumeNotify:v_volume=" + RecordVolumeNotify.v_volume + ",v_ext=" + RecordVolumeNotify.v_ext); if (RecordVolumeNotify != null) { recordVolume = RecordVolumeNotify.v_volume; } }
private void ImRecordVolume(object data) { ImRecordVolumeNotify RecordVolumeNotify = data as ImRecordVolumeNotify; LuaClient.Instance.Call("ImRecordVolume", RecordVolumeNotify.v_volume); }
//private void StopRecordResponse(ImRecordStopResp data) //{ // if(!string.IsNullOrEmpty(data.strfilepath)) // { // recordPath=data.strfilepath; // labelText = "停止录音返回:"+recordPath; // Debug.Log("停止录音返回:"+recordPath); // } //} public void ImRecordVolume(object data) { ImRecordVolumeNotify RecordVolumeNotify = data as ImRecordVolumeNotify; Debug.Log("ImRecordVolumeNotify:v_volume=" + RecordVolumeNotify.v_volume); }
//录音音量大小回调监听 public void ImRecordVolume(object data) { ImRecordVolumeNotify RecordVolumeNotify = data as ImRecordVolumeNotify; _voiceImage.fillAmount = (RecordVolumeNotify.v_volume + 5) * 0.01f; }