diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-07-13 23:02:07 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-07-13 23:02:07 +0200 |
commit | 3eeb0734baedb4ef61f78b8d18a81e67d3273b3a (patch) | |
tree | 04756ab97b2e1eb8430f1b5580a7f2cdb6146c7d /Applications/Piano | |
parent | 173edcc5aeaa60b24ec877edc2abb6322b29721b (diff) | |
download | serenity-3eeb0734baedb4ef61f78b8d18a81e67d3273b3a.zip |
Piano: Remove some unused code.
Diffstat (limited to 'Applications/Piano')
-rw-r--r-- | Applications/Piano/PianoWidget.cpp | 10 | ||||
-rw-r--r-- | Applications/Piano/PianoWidget.h | 4 |
2 files changed, 0 insertions, 14 deletions
diff --git a/Applications/Piano/PianoWidget.cpp b/Applications/Piano/PianoWidget.cpp index de3b394ef7..9031fd87fa 100644 --- a/Applications/Piano/PianoWidget.cpp +++ b/Applications/Piano/PianoWidget.cpp @@ -7,7 +7,6 @@ PianoWidget::PianoWidget() { memset(keys, 0, sizeof(keys)); - m_bitmap = GraphicsBitmap::create(GraphicsBitmap::Format::RGB32, { m_width, m_height }); m_front_buffer = new Sample[2048]; m_back_buffer = new Sample[2048]; } @@ -353,12 +352,3 @@ void PianoWidget::render_knobs(GPainter& painter) painter.draw_rect(wave_knob_rect, Color(r, g, b)); painter.draw_text(wave_knob_rect, wave_name, TextAlignment::Center, Color(r, g, b)); } - -void PianoWidget::event(CEvent& event) -{ - if (event.type() == CEvent::Custom) { - dbg() << "Piano got custom event!"; - update(); - } - GWidget::event(event); -} diff --git a/Applications/Piano/PianoWidget.h b/Applications/Piano/PianoWidget.h index a258620bcd..8634544f5c 100644 --- a/Applications/Piano/PianoWidget.h +++ b/Applications/Piano/PianoWidget.h @@ -10,14 +10,12 @@ public: PianoWidget(); virtual ~PianoWidget() override; - void fill_audio_buffer(uint8_t* stream, int len); private: virtual void paint_event(GPaintEvent&) override; virtual void keydown_event(GKeyEvent&) override; virtual void keyup_event(GKeyEvent&) override; - virtual void event(CEvent&) override; double w_sine(size_t); double w_saw(size_t); @@ -36,8 +34,6 @@ private: Sample* m_front_buffer { nullptr }; Sample* m_back_buffer { nullptr }; - RefPtr<GraphicsBitmap> m_bitmap; - #define note_count sizeof(note_frequency) / sizeof(double) bool m_note_on[note_count]; |