Hello...

I've been trying to learn about audio sampling in C++ for past few days. What I learnt was that computer converts analog signal (of sound) and converts it to digital discreet signals and unit called a sample. Also there may be around 40,000 samples taken in a second.

My question is what information do each sample contain. Is it the sound's intensity level at that point, its pressure displacement, or anything else.

In c++, there is a structure "WAVEHDR" which stores the digitized information of each sample converted from analog signal.

http://msdn.microsoft.com/en-us/library/ms713724(v=vs.85).aspx

What exactly is the information stored in the buffer ('lpdata') corresponding to each sample. I mean, how do I interpret that information?

thanks....

It depends on the sensor you are using. Some microphones measure pressure, some measure rate of change of pressure, some measure others things.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.