diff options
author | kleines Filmröllchen <filmroellchen@serenityos.org> | 2022-07-13 12:44:19 +0200 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-07-22 19:35:41 +0100 |
commit | 4941cffdd04c6ab7ed003005ac78eabc9168b2e8 (patch) | |
tree | 6bab60c58ec75810e01622eee4b1102a7e09a8f9 /Userland/Applications/Piano/WaveWidget.cpp | |
parent | 125122a9abe412fc8f197c7c2c96c43f7229dd28 (diff) | |
download | serenity-4941cffdd04c6ab7ed003005ac78eabc9168b2e8.zip |
Piano+LibDSP: Move Track to LibDSP
This is a tangly commit and it fixes all the bugs that a plain move
would have caused (i.e. we need to touch other logic which had wrong
assumptions).
Diffstat (limited to 'Userland/Applications/Piano/WaveWidget.cpp')
-rw-r--r-- | Userland/Applications/Piano/WaveWidget.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Userland/Applications/Piano/WaveWidget.cpp b/Userland/Applications/Piano/WaveWidget.cpp index 25f1df548f..1a9edf03d9 100644 --- a/Userland/Applications/Piano/WaveWidget.cpp +++ b/Userland/Applications/Piano/WaveWidget.cpp @@ -33,9 +33,10 @@ void WaveWidget::paint_event(GUI::PaintEvent& event) painter.fill_rect(frame_inner_rect(), Color::Black); painter.translate(frame_thickness(), frame_thickness()); - Color left_wave_color = left_wave_colors[m_track_manager.current_track().synth()->wave()]; - Color right_wave_color = right_wave_colors[m_track_manager.current_track().synth()->wave()]; - auto buffer = m_track_manager.buffer(); + Color left_wave_color = left_wave_colors[m_track_manager.current_track()->synth()->wave()]; + Color right_wave_color = right_wave_colors[m_track_manager.current_track()->synth()->wave()]; + // FIXME: We can't get the last buffer from the track manager anymore + auto buffer = FixedArray<Music::Sample>::must_create_but_fixme_should_propagate_errors(sample_count); double width_scale = static_cast<double>(frame_inner_rect().width()) / buffer.size(); int prev_x = 0; |