Support B-Format output with the wave file writer
Improve ambient gain calculations
Set headphones when dsound reports headphones