# Direct sound samples

This topic is 4817 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

What physical value does the samples of the directSoundBuffer represent? What does the 8 bit and the 16 bit of the sound data represent? Is it decibels? How does the 8 bit and 16 bit translate into decibels?

##### Share on other sites
Sound data is made up of a few components

Channels: This is how many separate channels of sounds are stored in one sample. Common values are 1 and 2 for mono and stereo sound respectivly

Samples: This refers to how many samples it will take to play one second of audio. Common values are 8000, 11025, 44100

Bits Per Sample: This should really be Bits Per Channel as each channel consists of this many bits. Common values are 8 and 16 bit.

the number of bytes it takes to store audio can be calculated as

channels * samples * (bitspersample / 8) * timeinseconds

an 8 bit sample of sound consists of a value from -127 and 128 indicating the amplitude of the wave data. 0 being the neutral position of the wave form

an 16 bit sample of sound consists of a value from 0 to 65535 where 32768 is the neutral position of the wave form

as you can see the 16 bit sample has a much finer resolution of sound and therefor produces a smoother approximation of the change in amplitude of the wave form producing a clearer, less grainy sound.

also having a high samples per second provides rate a much more acurrate representation of the waveform providing a truer reproduction when being played back.

a decibel is a unit of measurement measuring the loudness of sound.

##### Share on other sites
8 and 16 bits represent the resolution of the sample. A sample is a value that is taken from an analog signal and converted to an integer value that is the digital representation of that amplitude at any given point in time. EDIT: Changed frequency to amplitude, losing my mind. The frequency is inherently driven by the changes in amplitude. Sorry!

If you're interested, there is a lot more information on the web about digital audio waveform sampling.

EDIT: Ximmer beat me to it. Also, decibels are represented in the logarithmic domain. If you want to double the loudness, you'll increase about 10 dB.

##### Share on other sites
Quote:
 Original post by Supernat028 and 16 bits represent the resolution of the sample. A sample is a value that is taken from a range of frequency in an analog signal and converted to an integer value that is the digital representation of that frequency at any given point in time.

Wait, what? This is PCM data. A "sample" is total amplitude at a given time, not a given frequency component.

##### Share on other sites
Ok, but this is the digital value of the wave.
Doesnt the digital value represent some physical attributes?
Like, if you would store the length of a pencil in the computer, you would store it perhaps in centimeters and its physical attribute would be distance.
Doesnt the digital value of the wave have a physical dimention?
Something like air pressure or air density? or some other physical attribute?

##### Share on other sites
Quote:
 Original post by The C modest godOk, but this is the digital value of the wave.Doesnt the digital value represent some physical attributes?Like, if you would store the length of a pencil in the computer, you would store it perhaps in centimeters and its physical attribute would be distance.Doesnt the digital value of the wave have a physical dimention?Something like air pressure or air density? or some other physical attribute?

Speaker cone extension. Assuming a signed representation, +MAX represents the speaker cone pushed all the way forwards, and -MAX represents the speaker cone pulled all the way backwards.

1. 1
Rutin
38
2. 2
3. 3
4. 4
5. 5

• 11
• 9
• 12
• 14
• 9
• ### Forum Statistics

• Total Topics
633350
• Total Posts
3011471
• ### Who's Online (See full list)

There are no registered users currently online

×