Added possibility to specify sample rate via a -rate switch to the program