nix
nix

Reputation: 2285

Why audio files sound different?

I recorded some audio files that must be played from java. I did it about half-year ago. Now, when I add files, they sound as if being sped-up with higher pitch. Old files sound normally, new ones don't. I suppose there is something that has to be changed in audio parameters. What could it be?

That's the code I'm using to play .wav files:

AudioInputStream result1 = AudioSystem.getAudioInputStream(new File("/home/nikkka/Desktop/alphabet/result.wav")); 
DataLine.Info info = new DataLine.Info(Clip.class, result1.getFormat());
Clip clip = (Clip) AudioSystem.getLine(info);
clip.open(result1);
clip.start();

Upvotes: 0

Views: 79

Answers (1)

Stephen C
Stephen C

Reputation: 718788

At the risk of stating the obvious ...

If the old file still play fine and the new ones don't, then it must be something different about the way that you recorded the new files.

It doesn't sound like the real problem is anything to do with programming, let alone Java.


of course. but the thing is, i recorded the old files with settings i don't actually remember.

My suggestion is to fiddle with the settings until you can once again record files that play properly.

Upvotes: 1

Related Questions