lmms
Cross-platform music production software
Toggle main menu visibility
Loading...
Searching...
No Matches
plugins
SpectrumAnalyzer
DataprocLauncher.h
Go to the documentation of this file.
1
/*
2
* DataprocLauncher.h - QThread::create workaround for older Qt version
3
*
4
* Copyright (c) 2019 Martin Pavelek <he29/dot/HS/at/gmail/dot/com>
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 DATAPROCLAUNCHER_H
26
#define DATAPROCLAUNCHER_H
27
28
#include <QThread>
29
30
#include "
SaProcessor.h
"
31
#include "
LocklessRingBuffer.h
"
32
33
namespace
lmms
34
{
35
36
37
class
DataprocLauncher
:
public
QThread
38
{
39
public
:
40
explicit
DataprocLauncher
(
SaProcessor
&proc,
LocklessRingBuffer<SampleFrame>
&buffer)
41
:
m_processor
(&proc),
42
m_inputBuffer
(&buffer)
43
{
44
}
45
46
private
:
47
void
run
()
override
48
{
49
m_processor
->
analyze
(*
m_inputBuffer
);
50
}
51
52
SaProcessor
*
m_processor
;
53
LocklessRingBuffer<SampleFrame>
*
m_inputBuffer
;
54
};
55
56
57
}
// namespace lmms
58
59
#endif
// DATAPROCLAUNCHER_H
LocklessRingBuffer.h
SaProcessor.h
lmms::DataprocLauncher::DataprocLauncher
DataprocLauncher(SaProcessor &proc, LocklessRingBuffer< SampleFrame > &buffer)
Definition
DataprocLauncher.h:40
lmms::DataprocLauncher::m_inputBuffer
LocklessRingBuffer< SampleFrame > * m_inputBuffer
Definition
DataprocLauncher.h:53
lmms::DataprocLauncher::run
void run() override
Definition
DataprocLauncher.h:47
lmms::DataprocLauncher::m_processor
SaProcessor * m_processor
Definition
DataprocLauncher.h:52
lmms::LocklessRingBuffer
A convenience layer for a realtime-safe and thread-safe multi-reader ringbuffer.
Definition
LocklessRingBuffer.h:41
lmms::SaProcessor
Receives audio data, runs FFT analysis and stores the result.
Definition
SaProcessor.h:50
lmms::SaProcessor::analyze
void analyze(LocklessRingBuffer< SampleFrame > &ring_buffer)
Definition
SaProcessor.cpp:100
lmms
Definition
RemotePluginBase.cpp:34
Generated on
for lmms by
1.18.0