mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:17:35 +00:00
LibAudio+LibDSP: Switch samples to 32-bit float instead of 64-bit float
This has been overkill from the start, and it has been bugging me for a long time. With this change, we're probably a bit slower on most platforms but save huge amounts of space with all in-memory sample datastructures.
This commit is contained in:
parent
39c0f31009
commit
19a4b820c4
16 changed files with 329 additions and 329 deletions
|
@ -22,7 +22,7 @@ public:
|
|||
private:
|
||||
BarsVisualizationWidget();
|
||||
|
||||
void render(GUI::PaintEvent&, FixedArray<double> const&) override;
|
||||
void render(GUI::PaintEvent&, FixedArray<float> const&) override;
|
||||
void context_menu_event(GUI::ContextMenuEvent& event) override;
|
||||
|
||||
static constexpr size_t fft_size = 512;
|
||||
|
@ -30,9 +30,9 @@ private:
|
|||
// Things become weird near the Nyquist limit. Just don't use that FFT data.
|
||||
static constexpr size_t cutoff = fft_size - 32;
|
||||
|
||||
Array<Complex<double>, fft_size> m_fft_samples {};
|
||||
Array<double, fft_size> m_fft_window {};
|
||||
Array<double, fft_size / 2> m_previous_samples {};
|
||||
Array<Complex<float>, fft_size> m_fft_samples {};
|
||||
Array<float, fft_size> m_fft_window {};
|
||||
Array<float, fft_size / 2> m_previous_samples {};
|
||||
Array<int, bar_count> m_gfx_falling_bars {};
|
||||
bool m_is_using_last;
|
||||
bool m_adjust_frequencies;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue