Unwanted downsampling : Java Sound
Unwanted downsampling : Java Sound I have been trying to manually read a wav file in Java and read an array of bytes then write to an audio buffer for playback. I am receiving playback but it is heavily distorted. Java sound supports 16 bit sample rates but not 24-bit. I went in to Logic 9 and exported a 24-bit audio file in to 16-bit and then used with my program. Originally, the 24-bit samples would produces white noise. Now I can hear my sample but very distorted and sounds like it has been bit crushed. Can anyone help me to get a clean signal? I am very new to audio programming but I am currently working on a basic Digital Audio Workstation. import javax.sound.sampled.*; import javax.sound.sampled.DataLine.Info; import javax.swing.filechooser.FileNameExtensionFilter; import java.io.*; public class AudioData { private String filepath; private String filepath1; private File file; private byte fileContent; private Mixer mixer; private Mixer.Info mixInfos; ...