Well, if you want to plot audio, you really need to understand how audio formats work.
Actually, you only need to know how raw audio formats work.
Then it is just a matter of scaling back both resolution and time to the required display resolution. Both of which are easy:
Resolution:
- scale back from 44100/48000/higher samples per second to let's say 512 pixels. That means you throw away most of the data anyway, so you can take shortcuts.
- scale back the timing in the same way, so both are in sync. Again, easy.
If you want to plot audio, you really need to know how audio works. There are no shortcuts.
I have some old KOL controls lying around that can help you. See if I can still find them after all these years. (KOL back to VCL/LCL is easy)
Wait...
The AsioVst package contains that code. Simply get it from OPM.
Note it is definitely NOT cross platform and definitely works best - or only - on 32 bit Windows, but the sourcecode may help you anyway. We wrote it over 20 years ago....
There is also some useful code in the musicdsp archives by me and by Tobias. (again, way more than 20 years old). The code by Tobias in his audio filter design program is probably the best of that. It is still a treasure for Object Pascal audio programmers.
What Christian did right is to bundle it.
Another good example for audio code is the dcp-dsp package which is available from Torry's. Also more than 20 years old.
[edit]
I see that dcp-dsp needs some {$mode delphi} injected, but the code is written in D5 and D7 so will compile in FPC/Lazarus too.