Add samplingRate property to player (as setter/getter), also use variable in the closure instead of creating another one