1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 08:17:35 +00:00

Piano: Add Play/Pause, Forward and Back buttons

Piano now has a toolbar allowing the playback to be paused,
or to be stepped forward or back a note.
This commit is contained in:
JJ Roberts-White 2021-07-11 12:58:17 +10:00 committed by Ali Mohammad Pur
parent 54c005754a
commit 74f1f2b5e2
10 changed files with 234 additions and 69 deletions

View file

@ -1,6 +1,7 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2019-2020, William McPherson <willmcpherson2@gmail.com>
* Copyright (c) 2021, JJ Roberts-White <computerfido@gmail.com>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -26,7 +27,9 @@ public:
Span<const Sample> buffer() const { return m_current_front_buffer; }
int octave() const { return m_octave; }
int octave_base() const { return (m_octave - octave_min) * 12; }
int time() const { return m_time; }
void time_forward(int amount);
void fill_buffer(Span<Sample>);
void reset();