diff options
author | Ben Wiederhake <BenWiederhake.GitHub@gmx.de> | 2021-10-31 23:38:04 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-11-02 22:56:53 +0100 |
commit | 465af4c4d4f403909208a420c21dbf7cf9cc015d (patch) | |
tree | eac280a0bf8e2a6d852852bb2a4bb5a430967843 /Userland/Applications/Piano | |
parent | 6b75a4dfc32e870e001cc2856fb4498069c39708 (diff) | |
download | serenity-465af4c4d4f403909208a420c21dbf7cf9cc015d.zip |
Applications: Fix visibility of Object-derivative constructors
Derivatives of Core::Object should be constructed through
ClassName::construct(), to avoid handling ref-counted objects with
refcount zero. Fixing the visibility means that misuses like this are
more difficult.
Diffstat (limited to 'Userland/Applications/Piano')
-rw-r--r-- | Userland/Applications/Piano/AudioPlayerLoop.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Applications/Piano/AudioPlayerLoop.h b/Userland/Applications/Piano/AudioPlayerLoop.h index 0125215298..186b833190 100644 --- a/Userland/Applications/Piano/AudioPlayerLoop.h +++ b/Userland/Applications/Piano/AudioPlayerLoop.h @@ -17,17 +17,17 @@ class TrackManager; // Wrapper class accepting custom events to advance the track playing and forward audio data to the system. // This does not run on a separate thread, preventing IPC multithreading madness. -class AudioPlayerLoop : public Core::Object { +class AudioPlayerLoop final : public Core::Object { C_OBJECT(AudioPlayerLoop) public: - AudioPlayerLoop(TrackManager& track_manager, bool& need_to_write_wav, Audio::WavWriter& wav_writer); - void enqueue_audio(); void toggle_paused(); bool is_playing() { return m_should_play_audio; } private: + AudioPlayerLoop(TrackManager& track_manager, bool& need_to_write_wav, Audio::WavWriter& wav_writer); + TrackManager& m_track_manager; Array<Sample, sample_count> m_buffer; Optional<Audio::ResampleHelper<double>> m_resampler; |