| 
					
				 | 
			
			
				@@ -32,7 +32,9 @@ public class UserChannelContext { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	private final static Logger LOGGER = LoggerFactory.getLogger(UserChannelContext.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	private int offsetMS = 300; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	private int offsetMS = 100; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	private String platform; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	private Long recordId; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -67,7 +69,8 @@ public class UserChannelContext { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	private HardLevelEnum hardLevel = HardLevelEnum.ADVANCED; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	public void init(String heardLevel, int subjectId, int beatDuration) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	public void init(String platform, String heardLevel, int subjectId, int beatDuration) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		this.platform = platform; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		this.subjectId = subjectId; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		this.beatDuration = beatDuration; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		this.beatByteLength = WaveformWriter.SAMPLE_RATE * WaveformWriter.BITS_PER_SAMPLE / 8 * beatDuration / 1000; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -273,11 +276,20 @@ public class UserChannelContext { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		receivedTime += durationTime; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		/*if(receivedTime <= offsetMS){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		}*/ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		if(offsetMS == 0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		switch (platform) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		case "ANDROID": 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			if (receivedTime <= offsetMS) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		case "IOS": 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			if(offsetMS == 0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		default: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		playTime += durationTime; 
			 |