I display audio data using the following method:
For each bin (one pixel-wide drawing column), I compute the min/max of all samples in this bin, then draw a line between min and max.
While this works well for small bin sizes, it becomes slow for large ones (5000 samples per bin), and I cannot draw everything in a single refresh time (1/60 s for instance).
Caching the bins seems to be a good solution, the sample data being constant (not dynamic), but generating all bins takes a lot of space and is not practical. And there is a lot of redundancy between of bin size and multiple of this bin size.
Not being the first to have this problem, i’m sure there is a plethora of memory/speed efficient caching methods for this exact purpose but I can’t find any good article description.
Any methods or pointers would be appreciated !