|
|
@@ -91,12 +91,13 @@ public class SoundCheckHandler implements WebSocketEventHandler {
|
|
|
if(Math.abs(normalCents - recordCents)<3){
|
|
|
userSoundCheckInfo.get(phone).setRightSize(userSoundCheckInfo.get(phone).getRightSize() + audioEvent.getBufferSize());
|
|
|
userSoundCheckInfo.get(phone).getErrorNum().set(0);
|
|
|
+ WebSocketHandler.sendTextMessage(phone, WebSocketInfo.success("checking", "trend", 0));
|
|
|
}else if(Math.abs(normalCents - recordCents)>=3){
|
|
|
userSoundCheckInfo.get(phone).getErrorNum().getAndIncrement();
|
|
|
+ WebSocketHandler.sendTextMessage(phone, WebSocketInfo.success("checking", "trend", normalCents>recordCents?-1:1));
|
|
|
}
|
|
|
}));
|
|
|
dispatcher.run();
|
|
|
- LOGGER.info(JSONObject.toJSONString(userSoundCheckInfo.get(phone)));
|
|
|
if(userSoundCheckInfo.get(phone).getRightSize()>SIZE){
|
|
|
WebSocketHandler.sendTextMessage(phone, WebSocketInfo.success("checkDone"));
|
|
|
userSoundCheckInfo.remove(phone);
|