main: change dframes to buffer length