LMMS
Loading...
Searching...
No Matches
Oscilloscope.h
Go to the documentation of this file.
1/*
2 * Oscilloscope.h - Oscilloscope effect to preview the incoming waveform
3 *
4 * Copyright (c) 2025 Keratin
5 *
6 * This file is part of LMMS - https://lmms.io
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public
19 * License along with this program (see COPYING); if not, write to the
20 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 * Boston, MA 02110-1301 USA.
22 *
23 */
24
25#ifndef LMMS_OSCILLOSCOPE_H
26#define LMMS_OSCILLOSCOPE_H
27
28#include "Effect.h"
30#include "LocklessRingBuffer.h"
31
32namespace lmms
33{
34
35class Oscilloscope : public Effect
36{
37public:
38 Oscilloscope(Model* parent, const Descriptor::SubPluginFeatures::Key* key);
39
40 ProcessStatus processImpl(SampleFrame* buf, const f_cnt_t frames) override;
41
42 EffectControls* controls() override { return &m_controls; }
43
46 static constexpr int InputBufferSize = 4096 * 4;
47
49
50private:
52
54
56};
57
58} // namespace lmms
59
60#endif // LMMS_OSCILLOSCOPE_H
Definition EffectControls.h:44
Effect(const Plugin::Descriptor *_desc, Model *_parent, const Descriptor::SubPluginFeatures::Key *_key)
Definition Effect.cpp:41
ProcessStatus
Definition Effect.h:147
A convenience layer for a realtime-safe and thread-safe multi-reader ringbuffer.
Definition LocklessRingBuffer.h:41
Definition Model.h:37
ProcessStatus processImpl(SampleFrame *buf, const f_cnt_t frames) override
Definition Oscilloscope.cpp:63
LocklessRingBuffer< SampleFrame > m_inputBuffer
Definition Oscilloscope.h:53
LocklessRingBuffer< SampleFrame > & inputBuffer()
Definition Oscilloscope.h:48
OscilloscopeControls m_controls
Definition Oscilloscope.h:51
EffectControls * controls() override
Definition Oscilloscope.h:42
Oscilloscope(Model *parent, const Descriptor::SubPluginFeatures::Key *key)
Definition Oscilloscope.cpp:55
friend class OscilloscopeControls
Definition Oscilloscope.h:55
static constexpr int InputBufferSize
Definition Oscilloscope.h:46
const Descriptor::SubPluginFeatures::Key & key() const
Definition Plugin.h:266
Definition SampleFrame.h:41
static uintptr_t parent
Definition pugl.h:1644
Definition AudioAlsa.cpp:35
std::uint64_t f_cnt_t
Definition LmmsTypes.h:43