mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 08:27:46 +00:00
Piano: Move m_front_buffer/m_back_buffer off heap
This commit is contained in:
parent
b3b522bae2
commit
e80061c808
2 changed files with 4 additions and 5 deletions
|
@ -6,9 +6,6 @@
|
|||
|
||||
PianoWidget::PianoWidget()
|
||||
{
|
||||
m_front_buffer = new Sample[2048];
|
||||
m_back_buffer = new Sample[2048];
|
||||
|
||||
set_font(Font::default_fixed_width_font());
|
||||
}
|
||||
|
||||
|
|
|
@ -57,8 +57,10 @@ private:
|
|||
int octave_base() const;
|
||||
|
||||
int m_sample_count { 0 };
|
||||
Sample* m_front_buffer { nullptr };
|
||||
Sample* m_back_buffer { nullptr };
|
||||
Sample m_front[2048] { 0, 0 };
|
||||
Sample m_back[2048] { 0, 0 };
|
||||
Sample* m_front_buffer { m_front };
|
||||
Sample* m_back_buffer { m_back };
|
||||
|
||||
#define note_count sizeof(note_frequency) / sizeof(double)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue