kwave
18.07.70
|
#include <Mul.h>
Public Slots | |
void | input_a (Kwave::SampleArray data) |
void | input_b (Kwave::SampleArray data) |
void | set_a (const QVariant &a) |
void | set_b (const QVariant &b) |
Signals | |
void | output (Kwave::SampleArray data) |
![]() | |
void | attributeChanged (const QVariant value) |
Public Member Functions | |
Mul () | |
virtual | ~Mul () Q_DECL_OVERRIDE |
virtual void | goOn () Q_DECL_OVERRIDE |
![]() | |
SampleSource (QObject *parent=Q_NULLPTR) | |
virtual | ~SampleSource () |
virtual bool | done () const |
![]() | |
StreamObject (QObject *parent=Q_NULLPTR) | |
virtual | ~StreamObject () |
virtual unsigned int | tracks () const |
virtual Kwave::StreamObject * | operator[] (unsigned int track) |
virtual unsigned int | tracksOfPort (const char *port) const |
virtual Kwave::StreamObject * | port (const char *port, unsigned int track) |
virtual unsigned int | blockSize () const |
void | setAttribute (const char *attribute, const QVariant &value) |
Private Member Functions | |
virtual void | multiply () |
Private Attributes | |
QQueue< Kwave::SampleArray > | m_queue_a |
QQueue< Kwave::SampleArray > | m_queue_b |
QSemaphore | m_sem_a |
QSemaphore | m_sem_b |
Kwave::SampleArray | m_a |
Kwave::SampleArray | m_b |
Kwave::SampleArray | m_buffer_x |
bool | m_a_is_const |
bool | m_b_is_const |
float | m_value_a |
float | m_value_b |
QMutex | m_lock |
Additional Inherited Members | |
![]() | |
static void | setInteractive (bool interactive) |
Kwave::Mul::Mul | ( | ) |
|
virtual |
does nothing, work is done automatically in multiply()
Implements Kwave::SampleSource.
|
slot |
receives input data for input A
Definition at line 134 of file Mul.cpp.
References m_a_is_const, m_b_is_const, m_lock, m_queue_a, m_queue_b, m_sem_a, and multiply().
|
slot |
receives input data for input B
Definition at line 147 of file Mul.cpp.
References m_a_is_const, m_b_is_const, m_lock, m_queue_a, m_queue_b, m_sem_b, and multiply().
|
privatevirtual |
does the calculation
Definition at line 51 of file Mul.cpp.
References Kwave::StreamObject::blockSize(), Kwave::SampleArray::constData(), Kwave::SampleArray::data(), float2sample(), m_a, m_a_is_const, m_b, m_b_is_const, m_buffer_x, m_lock, m_queue_a, m_queue_b, m_sem_a, m_sem_b, m_value_a, m_value_b, output(), Kwave::SampleArray::resize(), sample2float(), and Kwave::SampleArray::size().
Referenced by input_a(), and input_b().
|
signal |
emits a block with the interpolated curve
Referenced by multiply().
|
slot |
sets input A to a constant value (as float)
Definition at line 160 of file Mul.cpp.
References m_a_is_const, m_lock, and m_value_a.
|
slot |
sets input B to a constant value (as float)
Definition at line 169 of file Mul.cpp.
References m_b_is_const, m_lock, and m_value_b.
|
private |
buffer for input A (currently in work)
Definition at line 88 of file Mul.h.
Referenced by multiply().
|
private |
|
private |
buffer for input B (currently in work)
Definition at line 91 of file Mul.h.
Referenced by multiply().
|
private |
|
private |
|
private |
|
private |
queue for input A
Definition at line 76 of file Mul.h.
Referenced by input_a(), input_b(), and multiply().
|
private |
queue for input B
Definition at line 79 of file Mul.h.
Referenced by input_a(), input_b(), and multiply().
|
private |
semaphore to wait for input on input A
Definition at line 82 of file Mul.h.
Referenced by input_a(), and multiply().
|
private |
semaphore to wait for input on input B
Definition at line 85 of file Mul.h.
Referenced by input_b(), and multiply().
|
private |
if m_a_is_const is set, the value of A
Definition at line 103 of file Mul.h.
Referenced by multiply(), and set_a().
|
private |
if m_b_is_const is set, the value of B
Definition at line 106 of file Mul.h.
Referenced by multiply(), and set_b().