make Flash resample code tiny bit more readable and perhaps a tiny bit faster