monkey patches Burgestrand's changes to get this to be more efficient so it hopefully plays smoothly on the raspberry pi.