| | |
| | | import com.moral.yunfushao.model.UpLoadParam; |
| | | import com.moral.yunfushao.model.VoiceBean; |
| | | import com.moral.yunfushao.ui.PanelView; |
| | | import com.moral.yunfushao.utils.AudioUtils; |
| | | import com.moral.yunfushao.utils.DebugUtils; |
| | | |
| | | import org.greenrobot.eventbus.EventBus; |
| | |
| | | private ArrayList<VoiceBean> voiceList = new ArrayList<>(); |
| | | AssetManager am; |
| | | MediaPlayer mp; |
| | | private boolean isVirating = false; |
| | | |
| | | private LinearLayout ll_status; |
| | | private TextView tv_ljjl, tv_tishi, tv_desc, tv_shishi, tv_status; |
| | |
| | | pv.setPercent((float) (shishiValue * (0.25 / 0.16))); |
| | | showStatus(0); |
| | | stop(); |
| | | if(isVirating){ |
| | | isVirating = false; |
| | | AudioUtils.virateCancle(getActivity()); |
| | | } |
| | | preLevel = -1; |
| | | } else if (shishiValue >= 0.16 && shishiValue < 0.8) { |
| | | data.setIs_warn(1); |
| | | pv.setPercent((float) (0.25 + shishiValue * (0.25 / 0.8))); |
| | | showStatus(1); |
| | | play(0); |
| | | if(!isVirating){ |
| | | isVirating = true; |
| | | AudioUtils.vibrate(getActivity(), new long[]{1000, 1000, 1000, 1000}, 0); |
| | | } |
| | | } else if (shishiValue >= 0.8 && shishiValue < 2) { |
| | | data.setIs_warn(1); |
| | | showStatus(2); |
| | | pv.setPercent((float) (0.5 + shishiValue * (0.25 / 2))); |
| | | play(1); |
| | | if(!isVirating){ |
| | | isVirating = true; |
| | | AudioUtils.vibrate(getActivity(), new long[]{1000, 1000, 1000, 1000}, 0); |
| | | } |
| | | } else if (shishiValue >= 2) { |
| | | data.setIs_warn(1); |
| | | showStatus(3); |
| | |
| | | pv.setPercent(1.0f); |
| | | } |
| | | play(2); |
| | | if(!isVirating){ |
| | | isVirating = true; |
| | | AudioUtils.vibrate(getActivity(), new long[]{1000, 1000, 1000, 1000}, 0); |
| | | } |
| | | } |
| | | submitResult.add(data); |
| | | // realResult.clear(); |