1
0
mirror of https://github.com/clementine-player/Clementine synced 2025-01-03 13:30:26 +01:00

Initialize array in a nicer way

This commit is contained in:
Mark Furneaux 2014-12-21 23:53:42 -05:00
parent 1d31378174
commit 6157865d7b

View File

@ -138,8 +138,7 @@ gst_fastspectrum_alloc_channel_data (GstFastSpectrum * spectrum)
spectrum->fft_output =reinterpret_cast<fftw_complex*>(
fftw_malloc(sizeof(fftw_complex) * (nfft/2+1)));
spectrum->spect_magnitude = new double[bands];
memset(spectrum->spect_magnitude, 0, spectrum->bands * sizeof(double));
spectrum->spect_magnitude = new double[bands]();
GstFastSpectrumClass* klass = reinterpret_cast<GstFastSpectrumClass*>(
G_OBJECT_GET_CLASS(spectrum));