This is a quick question, how is audio stored when it’s in a byte array, like when a image is stored in a byte array there is three(Red, green, blue) bytes per pixel. So how is a audio stored in a byte array?
Thanks,
Liam.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There are various possible encodings that are supported in Java. See:
The most simple form is PCM coding, in which each sample is a linear number that represents the sound waveform (which could be 1 byte for 8-bit encoding).
You also have to consider the number of channels (1 for mono, 2 for stereo). So 16-bit PCM-encoded stereo sound will require 4 bytes per sample, for example.