Added detection of 48kHz and 96kHz support. Fixed a thinko, and some