I've been capturing audio using the loopback capture mode (found here). The captured waveform is a 32 bit waveform. I'm struggling with converting this to a 16 bit waveform so encoders like lame can deal with it (it says Unsupported data format:
I've tried shifting the bits (not my strong point) in the wave stream itself from 32 bit to 16 bit but the result still sounds distorted.
The Wave32To16Stream class seems to blow up on this case:
if (sourceStream.WaveFormat.Encoding != WaveFormatEncoding.IeeeFloat) throw new ApplicationException("Only 32 bit Floating point supported");
Ideally I would want to just capture straight to 16 bit, is there no way to set the capture bit depth? If not, could somebody help me with converting the wavestream?
An example of a captured waveform can be found here: http://dl.dropbox.com/u/454409/test.wav (10mb)
I would also settle for some way to encode this to mp3 with lame, I've tried every parameter permutation I can think of to get it to accept the wave file. What's interesting is Audacity (which uses lame_enc to encode mp3s) was able to create an mp3
from the waveform (but maybe Audacity automatically converts it to 16bit before passing it to lame).