sn3ek
sn3ek

Reputation: 1929

Which format has an audio stream before reaching the soundcard?

I want to manipulate an audio stream before it gets to the soundcard. So I wanna use the sAPOs from Microsoft to manipulate the audiostream in the audio engine (vista audio architecture).

My basic question actually is which format the audio stream is in. I don't know but I think it is the WAVE format or the RIFF. Can anyone help me in this case? :)

Upvotes: 0

Views: 259

Answers (3)

kent
kent

Reputation: 6566

typically most sound cards work with 16bit signed integers representing linear PCM audio: [http://en.wikipedia.org/wiki/Linear_pulse_code_modulation] however this is not always the case (just typically). generally if your audio API's are not already converting this 'raw' audio into floating point representation, then you will need some code to do this, unless you are particularly fond of performing math on integers.

as Larry has already pointed out, many API's will handle the floating point conversion for you and simply pass a buffer of floats, the convention is that they are values between -1 and 1.

|K<

Upvotes: 1

Larry Osterman
Larry Osterman

Reputation: 16142

Your APO tells the audio engine what input and output formats it supports, the engine will give it whatever you tell it (that's not actually 100% accurate - it's roughly correct and you need to read the APO documentation for full information).

The actual audio data will be whatever is specified, typically they will be 32 bit floating point samples with an amplitude between -1.0 and 1.0.

Upvotes: 1

Roger Lipscombe
Roger Lipscombe

Reputation: 91825

Apparently, the format is negotiated.

Upvotes: 2

Related Questions