yonge 1 년 전
부모
커밋
ebf054fb8d
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      audio-analysis/src/main/java/com/yonge/netty/dto/UserChannelContext.java

+ 2 - 2
audio-analysis/src/main/java/com/yonge/netty/dto/UserChannelContext.java

@@ -732,7 +732,7 @@ public class UserChannelContext {
 
 		ChunkAnalysis firstChunkAnalysis = chunkAnalysisList.get(0);
 		
-		Optional<ChunkAnalysis> chunkAnalysisOptional = totalChunkAnalysisList.stream().filter(t -> Double.doubleToLongBits(t.getEndTime()) < Double.doubleToLongBits(firstChunkAnalysis.getStartTime())).reduce((first, second) -> second);
+		Optional<ChunkAnalysis> chunkAnalysisOptional = totalChunkAnalysisList.stream().filter(t -> Double.doubleToLongBits(t.getEndTime()) <= Double.doubleToLongBits(firstChunkAnalysis.getStartTime())).reduce((first, second) -> second);
 
 		ChunkAnalysis lastChunkAnalysis = null;
 		if (chunkAnalysisOptional.isPresent()) {
@@ -892,7 +892,7 @@ public class UserChannelContext {
 			return chunkList.stream().filter(t -> t.getAmplitude() > hardLevel.getAmplitudeThreshold()).count() <= 0;
 		}
 		
-		Optional<ChunkAnalysis> chunkAnalysisOptional = totalChunkAnalysisList.stream().filter(t -> Double.doubleToLongBits(t.getEndTime()) < Double.doubleToLongBits(firstChunkAnalysis.getStartTime())).reduce((first, second) -> second);
+		Optional<ChunkAnalysis> chunkAnalysisOptional = totalChunkAnalysisList.stream().filter(t -> Double.doubleToLongBits(t.getEndTime()) <= Double.doubleToLongBits(firstChunkAnalysis.getStartTime())).reduce((first, second) -> second);
 
 		ChunkAnalysis lastChunkAnalysis = new ChunkAnalysis(0, 0, -1, 0, 0, 0);;
 		if (chunkAnalysisOptional.isPresent()) {