Ganito lang man:
The number of samples in any given MONO or STEREO waveform is calculated this way:
(length of soundclip in seconds) x (sample rate) = no. of samples
Examples:
for a 5:00 song in 44,100KHz Sampling Rate
(5minutes x 60 seconds/min) x (44,100 samples/second) = 13,230,000 samples
for a 3:30 song in 88,200KHz Sampling Rate
(3.5 minutes x 60 seconds/min) x (88,200 samples/second) = 18,522,000 samples
Now, how do you calculate the NUMBER OF BYTES an audio file takes?
FOR MONO:
For 16-bit, it is simply computed by multiplying the number of samples by 2. That is because 8 bits = 1 byte, THUS 16 bits = 2 bytes. For 24-bit, you multiply the number of samples by 3. For 32-bit, you multiply the number of samples by 4.
Example:
a 5:00 16-bit/44,100Hz wav file in MONO should take
13,230,000 samples x 2 bytes/sample = 26,460,000 bytes OR 25.23Mb (since 1Kb = 1,024 bytes)
a 5:00 24-bit/44,100Hz wav file in MONO should take
13,230,000 samples x 3 bytes/sample = 39,690,000 bytes OR 37.85Mb (since 1Kb = 1,024 bytes, and 1MB = 1024Kb)
a 5:00 32-bit/44,100Hz wav file in MONO should take
13,230,000 samples x 4 bytes/sample = 52,920,000 bytes OR 50.46Mb (since 1Kb = 1,024 bytes)
FOR STEREO:
Likewise, for 16-bit, it is simply computed by multiplying the number of samples by 2. That is because 8 bits = 1 byte, THUS 16 bits = 2 bytes. For 24-bit, you multiply the number of samples by 3. For 32-bit, you multiply the number of samples by 4. But for STEREO, simply double that of computing for MONO, since you have TWO signals with the same sampling rate and bit-depth.
Example:
a 5:00 16-bit/44,100Hz wav file in STEREO should take
13,230,000 samples x 2 bytes/sample X 2 = 52,920,000 bytes OR 50.46Mb (since 1Kb = 1,024 bytes)
Dapat siguro may quiz sa thread na ito...