diff --git a/aegisub/src/audio_renderer_spectrum.cpp b/aegisub/src/audio_renderer_spectrum.cpp index f2e285a9e..260735a99 100644 --- a/aegisub/src/audio_renderer_spectrum.cpp +++ b/aegisub/src/audio_renderer_spectrum.cpp @@ -185,10 +185,10 @@ void AudioSpectrumRenderer::SetResolution(size_t _derivation_size, size_t _deriv } template -void AudioSpectrumRenderer::ConvertToFloat(size_t count, T &dest) { +void AudioSpectrumRenderer::ConvertToFloat(size_t count, T *dest) { for (size_t si = 0; si < count; ++si) { - dest[si] = (float)(audio_scratch[si]) / 32768.f; + dest[si] = (T)(audio_scratch[si]) / 32768.0; } } @@ -214,7 +214,7 @@ void AudioSpectrumRenderer::FillBlock(size_t block_index, float *block) o++; } #else - ConvertToFloat(2 << derivation_size, fft_scratch); + ConvertToFloat(2 << derivation_size, &fft_scratch[0]); float *fft_input = &fft_scratch[0]; float *fft_real = &fft_scratch[0] + (2 << derivation_size); diff --git a/aegisub/src/audio_renderer_spectrum.h b/aegisub/src/audio_renderer_spectrum.h index 054ca4134..45a7410e9 100644 --- a/aegisub/src/audio_renderer_spectrum.h +++ b/aegisub/src/audio_renderer_spectrum.h @@ -99,7 +99,7 @@ class AudioSpectrumRenderer : public AudioRendererBitmapProvider { /// @param count Samples to convert /// @param dest Buffer to fill template - void ConvertToFloat(size_t count, T &dest); + void ConvertToFloat(size_t count, T *dest); #ifdef WITH_FFTW /// FFTW plan data