Open PKBeam opened 1 year ago
The current code for drawing a waveform includes a bitmap format conversion that's probably quite slow and really shouldn't be there.
// VorbisWaveformVisualiser.cs
private ImageSource _Draw(double height, double width, CancellationToken ct) {
// ...
return RenderTargetToImage(bmp); // <---
}
however, simply return
ing bmp
causes the window to freeze with a bizarre low level exception (UCEERR_RENDERTHREADFAILURE
) and I have no idea why it's happening.
added an option to display a spectrogram of the audio file. need to add a toggle in settings to enable/disable it.
toggle added. performance issues (mem usage) should be investigated later
Spectrogram released in 1.2.0
There are a few issues with the existing waveform:
Is there a better way to draw the waveform? Maybe draw it in chunks?
Is there a better way to create the waveform? Maybe FFT the samples in the audio stream and show the waveform only for certain frequencies. Or draw a second waveform over the first that's FFT'd specifically to bass/treble frequencies for drums.