Updated sample to use the delegate and added possibility to set different target fps.