integrated some fixes from sound for mac. Doesn't fix everything.