app: use variable buffer length for a more stable direction