making sample capture fixed at 256 and make it fit in the graph