high resolution time stamps for waves
Thu, 12/06/2018 - 06:43 am
I took a quick look into what one could do about high resolution time stamps for waves when the issue was mentioned on the mailing list in November 2018. Apparently this is not so easy a subject if one needs cross-platform portability.
Look here for a reference: <https://stackoverflow.com/questions/361363/how-to-measure-time-in-milli…;
It's only tangential to my own interests, so I coded a simple solution for MacOSX with XOP Toolkit 8.01 and left it at that. Contact me directly if you need further details. I used XFUNC1 as a template which ships with the toolkit. A code snippet:
#define BUFFERSIZE 256
struct tm *theTime;
struct timeval time_prec;
strftime(aDateTime,BUFFERSIZE-1,"%a, %d %b, %Y %T",theTime);
In the calling function:
sprintf(noteText,"time stamp added ---> %s",buffer);
Now use code such as in the XOP Toolkit Manual, version 8.01, under "Handle Example" on page 196, to convert this to a handle and set a wave note.