![]() |
|
[Java] Java AudioSystem .wav Scratchy/Bad Quality - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [Java] Java AudioSystem .wav Scratchy/Bad Quality (/showthread.php?tid=5788932) |
Java AudioSystem .wav Scratchy/Bad Quality - TomTheBeast - Jan 22, 2018 Hey, I'm working on a sound system for a game I'm working on, and I'm using java's Audiosystem to load and play the sound files. The sounds are fine near max or loud volume, but if I lower it, to let's say, around -27 decibels, it's scratchy, bad, and distorted. Any clues on what I can do? Code public void run()I'm also using the same thing to play MIDI files, and they play perfectly fine no matter the volume. It's only the .wav files that get distorted and scratchy. I've tried changing the audio format, but defaultly, playing like this, Java is already playing it at its maximum quality. RE: Java AudioSystem .wav Scratchy/Bad Quality - Psifour - Jan 28, 2018 Can you pm me a link for your wav? Specifically I want to know the length and how many bits it is. What device are you running your code on that is showing this issue or is it present on multiple devices? What version of the JDK/JRE are you using? If you can get me that stuff I can take a look at your problem and try to get you sorted out. May take me a day or two to get back to you, but just send me a reminder by PM if I don't acknowledge your answer in a timely manner. RE: Java AudioSystem .wav Scratchy/Bad Quality - Folks - Jan 29, 2018 Code try {This works for me and doesn't sound grainy. I'm almost sure this is what you have too but I can't see all your code. Is it possible it is your headphones causing the grain? |