Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
424 views
in Technique[技术] by (71.8m points)

bytearray - How to determine if 8bit WAV File is signed or unsigned, using Java and without javax.sound

I need to know whether a ".wav" of 8bits, is signed or unsigned PCM, by only reading file. I cannot use "javax.sound.sampled.*" or AudioSystem libraries.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

In the wav File, 8-bit samples are stored as unsigned bytes, ranging from 0 to 255. The 16-bit samples are stored as signed integers in 2's-complement.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...