summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibDSP/Transport.h
diff options
context:
space:
mode:
authorkleines Filmröllchen <filmroellchen@serenityos.org>2022-05-11 22:01:36 +0200
committerLinus Groh <mail@linusgroh.de>2022-05-13 00:47:26 +0200
commit4d65607649df71123835e78ddd81e1840bfefaeb (patch)
tree3a98470b5cbdd76bc537418db5a687caec78c8f3 /Userland/Libraries/LibDSP/Transport.h
parentf23aea0c4b049c7b2ffab442175dfbd2ea7b54e8 (diff)
downloadserenity-4d65607649df71123835e78ddd81e1840bfefaeb.zip
LibDSP: Remove Transport's time counter reference API
This is what the old Transport in Piano had, but as everyone just references Transport directly, there's no need for it anymore.
Diffstat (limited to 'Userland/Libraries/LibDSP/Transport.h')
-rw-r--r--Userland/Libraries/LibDSP/Transport.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/Userland/Libraries/LibDSP/Transport.h b/Userland/Libraries/LibDSP/Transport.h
index 0acd8d725f..23723e27c5 100644
--- a/Userland/Libraries/LibDSP/Transport.h
+++ b/Userland/Libraries/LibDSP/Transport.h
@@ -15,7 +15,6 @@ namespace LibDSP {
// The DAW-wide timekeeper and synchronizer
class Transport final : public RefCounted<Transport> {
public:
- constexpr u32& time() { return m_time; }
constexpr u32 time() const { return m_time; }
constexpr u16 beats_per_minute() const { return m_beats_per_minute; }
constexpr double current_second() const { return static_cast<double>(m_time) / m_sample_rate; }
@@ -24,6 +23,8 @@ public:
constexpr double ms_sample_rate() const { return m_sample_rate / 1000.; }
constexpr double current_measure() const { return m_time / samples_per_measure(); }
+ void set_time(u32 time) { m_time = time; }
+
Transport(u16 beats_per_minute, u8 beats_per_measure, u32 sample_rate)
: m_beats_per_minute(beats_per_minute)
, m_beats_per_measure(beats_per_measure)