mirror of
https://github.com/clementine-player/Clementine
synced 2025-01-03 13:30:26 +01:00
Fix moodbars not generating correctly
The magnitude output from gstfastspectrum was not initialized for the first fft. In some cases, the memory would contain data that upon math operations becomes nan. This causes one or more colours of the moodbar to be generated blank, resulting in missing colours or just plain black moodbars.
This commit is contained in:
parent
4f66b6d453
commit
1d31378174
@ -139,6 +139,7 @@ gst_fastspectrum_alloc_channel_data (GstFastSpectrum * spectrum)
|
||||
fftw_malloc(sizeof(fftw_complex) * (nfft/2+1)));
|
||||
|
||||
spectrum->spect_magnitude = new double[bands];
|
||||
memset(spectrum->spect_magnitude, 0, spectrum->bands * sizeof(double));
|
||||
|
||||
GstFastSpectrumClass* klass = reinterpret_cast<GstFastSpectrumClass*>(
|
||||
G_OBJECT_GET_CLASS(spectrum));
|
||||
|
Loading…
Reference in New Issue
Block a user