liujunchi 3 years ago
parent
commit
b08e867dd7

+ 1 - 1
audio-analysis/src/main/java/com/yonge/netty/server/processor/WaveformWriter.java

@@ -46,7 +46,7 @@ public class WaveformWriter {
 
 	public static final short CHANNEL_NUM = 1;
 
-	public static final int SAMPLE_RATE = 44100/2;
+	public static final int SAMPLE_RATE = 44100;
 
 	public static final short BITS_PER_SAMPLE = 16;
 

+ 2 - 2
audio-analysis/src/main/java/com/yonge/netty/server/service/AudioCompareHandler.java

@@ -68,7 +68,7 @@ public class AudioCompareHandler implements MessageHandler {
 	/**
 	 * @describe 采样率
 	 */
-	private float sampleRate = 44100/2;
+	private float sampleRate = 44100;
 
 	/**
 	 * 每个采样大小(Bit)
@@ -83,7 +83,7 @@ public class AudioCompareHandler implements MessageHandler {
 	/**
 	 * @describe 采样大小
 	 */
-	private int bufferSize = 1024 * 2 * 2;
+	private int bufferSize = 1024 * 2 ;
 
 	private boolean signed = true;
 

+ 1 - 1
audio-analysis/src/main/java/com/yonge/netty/server/service/PitchDetectionHandler.java

@@ -26,7 +26,7 @@ public class PitchDetectionHandler implements MessageHandler {
 	/**
 	 * @describe 采样率
 	 */
-	private float sampleRate = 44100/2;
+	private float sampleRate = 44100;
 
 	/**
 	 * 每个采样大小(Bit)