improve robustness to invalid spect freq spec
improved PTB support for windows