fixed checks on sampleRate. An exception is thrown if the sampleRate is <= 0.