03-25-2019 04:42 PM - edited 03-25-2019 04:43 PM
I am looking for a way to determine the number of records in a waveform file. I have looked through the waveform palette but can't find anything that seems to help.
This is related to my Playing back a waveform thread but I thought I would start a new one to keep the question and answers separate.
In general I want to use a horizontal slider to move between records in the waveform file. So the user can pause playback, move to a new starting point and resume playback. To do this I need to know how many records are in the file so I can set the maximum record number on the slider.
So far I have come up with this:
But I really think there has to be a better way...
Solved! Go to Solution.
03-25-2019 04:55 PM
Try something like this.
If I remember correctly these are datalog files with 1d array of waveform as the record type.
0xDEAD
03-25-2019 05:02 PM
I was about to suggest something similar, but as my knowledge base is less than 57005's, my approach is "experimental". Read one record, figure out its size in bytes (you could "brute force" it with a typecast to array of u8), get the size (in bytes) of the file, and divide ... .
Bob Schor