LMMS
Loading...
Searching...
No Matches
Vectorscope.h
Go to the documentation of this file.
1/* Vectorscope.h - declaration of Vectorscope class.
2 *
3 * Copyright (c) 2019 Martin Pavelek <he29/dot/HS/at/gmail/dot/com>
4 *
5 * This file is part of LMMS - https://lmms.io
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public
18 * License along with this program (see COPYING); if not, write to the
19 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 * Boston, MA 02110-1301 USA.
21 *
22 */
23
24#ifndef VECTORSCOPE_H
25#define VECTORSCOPE_H
26
27#include "Effect.h"
28#include "LocklessRingBuffer.h"
29#include "VecControls.h"
30
31namespace lmms
32{
33
34
36class Vectorscope : public Effect
37{
38public:
39 Vectorscope(Model *parent, const Descriptor::SubPluginFeatures::Key *key);
40 ~Vectorscope() override = default;
41
42 ProcessStatus processImpl(SampleFrame* buf, const f_cnt_t frames) override;
43
44 EffectControls *controls() override {return &m_controls;}
46
47private:
49
50 // Maximum LMMS buffer size (hard coded, the actual constant is hard to get)
51 const unsigned int m_maxBufferSize = 4096;
53};
54
55
56} // namespace lmms
57
58#endif // VECTORSCOPE_H
59
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
const Descriptor::SubPluginFeatures::Key & key() const
Definition Plugin.h:266
Definition SampleFrame.h:41
Definition VecControls.h:44
~Vectorscope() override=default
ProcessStatus processImpl(SampleFrame *buf, const f_cnt_t frames) override
Definition Vectorscope.cpp:61
const unsigned int m_maxBufferSize
Definition Vectorscope.h:51
LocklessRingBuffer< SampleFrame > * getBuffer()
Definition Vectorscope.h:45
LocklessRingBuffer< SampleFrame > m_inputBuffer
Definition Vectorscope.h:52
VecControls m_controls
Definition Vectorscope.h:48
EffectControls * controls() override
Definition Vectorscope.h:44
Vectorscope(Model *parent, const Descriptor::SubPluginFeatures::Key *key)
Definition Vectorscope.cpp:50
static uintptr_t parent
Definition pugl.h:1644
Definition AudioAlsa.cpp:35
std::uint64_t f_cnt_t
Definition LmmsTypes.h:43