views:

134

answers:

3

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? :)

+2  A: 

Apparently, the format is negotiated.

Roger Lipscombe
+1  A: 

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.

Larry Osterman
+1  A: 

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<

kent