LolliPop
LolliPop

Reputation: 107

One sample value in 16 bits 11025 mono WAVE data

I do recording of incoming raw wave data from mic. The FORMAT is supported by WebCamera and it's 16 bits per sample, 11025 samples per second, mono.

The level of mic is on the very low.. just for purpose, to make sure the zero values are coming in. Also, it's quiet in the room. but.. data.. It's too far from to be on the very low. Pls, see the shot. [![shot][1]][1] Same with 8 bits works fine. The byte of 8 bits is equal to the middle (value of Byte.Max = 255) - 127-128 when quiet, and it's the level of noise. Then upper and lower - levels of incoming sampled signal with amplitude > 0. Now 16.. no any logic of the values, or maybe there is some logic, but I do not see it?

Should be just the same, only the buffer size two times bigger than for 8 bits signal, and it's 22050 bytes exactly. Please, help me to understand the value.

Upvotes: 2

Views: 74

Answers (1)

SleuthEye
SleuthEye

Reputation: 14577

Looks like your data is in fact signed short values which you are incorrectly interpreting as unsigned short. If we reinterpret the values larger than the midpoint 32128 in your sample to signed short (using the formula number-65536) you would instead get:

[6] -19
[7] -175
[8] -184
[9] -134

Those values are around 50 decibels quieter than the maximum amplitude. In comparison the least significant bit on 8-bit audio corresponds to 42 decibels quieter than the maximum.

Upvotes: 2

Related Questions