wave display
-
how can I display the data that I get from the USB2.0 port? The data from the USB port continuously is in the "int buffer[1000];" I would like to use the PolyLineto(pt,1000) function to draw the line ; pt is defined as CPoint pt[1000], for(int i=0;i<1000;i++) { pt[i].x=i; pt[i].y=buffer[i]; } if I use the "pt[i].y=buffer[i]; " sentence ,every time the CPU will do an extra copy work, it will waste the CPU time. Are there any good methords that I don't need to copy the buffer data to the pt[i].y array? thanks zhenyuanwu.
-
how can I display the data that I get from the USB2.0 port? The data from the USB port continuously is in the "int buffer[1000];" I would like to use the PolyLineto(pt,1000) function to draw the line ; pt is defined as CPoint pt[1000], for(int i=0;i<1000;i++) { pt[i].x=i; pt[i].y=buffer[i]; } if I use the "pt[i].y=buffer[i]; " sentence ,every time the CPU will do an extra copy work, it will waste the CPU time. Are there any good methords that I don't need to copy the buffer data to the pt[i].y array? thanks zhenyuanwu.
hi, Use memcpy fucntion it will copy the whole buffer at a shot. all the best Hasan. hasansheik@yahoo.co.in hasansheik@lycos.com