Cleaned up code, fixed ´inf´ output caused by flat/double conversion. Be sure to use up to 16384 samples only as UHD buff cannot handel 32K samples yet.