mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-22 20:45:14 +00:00
Piano: Remove some unused code.
This commit is contained in:
parent
173edcc5ae
commit
3eeb0734ba
Notes:
sideshowbarker
2024-07-19 13:17:16 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/3eeb0734bae
2 changed files with 0 additions and 14 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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];
|
||||
|
|
Loading…
Add table
Reference in a new issue