|
kwave
18.07.70
|
#include <RateConverter.h>


Public Slots | |
| void | input (Kwave::SampleArray data) |
| void | setRatio (const QVariant r) |
Signals | |
| void | output (Kwave::SampleArray data) |
Signals inherited from Kwave::StreamObject | |
| void | attributeChanged (const QVariant value) |
Public Member Functions | |
| RateConverter () | |
| virtual | ~RateConverter () Q_DECL_OVERRIDE |
| virtual void | goOn () Q_DECL_OVERRIDE |
Public Member Functions inherited from Kwave::SampleSource | |
| SampleSource (QObject *parent=Q_NULLPTR) | |
| virtual | ~SampleSource () |
| virtual bool | done () const |
Public Member Functions inherited from Kwave::StreamObject | |
| 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 Attributes | |
| double | m_ratio |
| SRC_STATE * | m_converter |
| QVarLengthArray< float, 65536 > | m_converter_in |
| QVarLengthArray< float, 65536 > | m_converter_out |
Additional Inherited Members | |
Static Public Member Functions inherited from Kwave::StreamObject | |
| static void | setInteractive (bool interactive) |
Definition at line 36 of file RateConverter.h.
| Kwave::RateConverter::RateConverter | ( | ) |
Constructor
Definition at line 26 of file RateConverter.cpp.
References m_converter.
|
virtual |
|
virtual |
does nothing, processing is done in input()
Implements Kwave::SampleSource.
Definition at line 44 of file RateConverter.cpp.
|
slot |
receives input data and also directly does the calculation
Definition at line 49 of file RateConverter.cpp.
References Kwave::SampleArray::constData(), Kwave::SampleArray::data(), float2sample(), Kwave::SampleArray::isEmpty(), m_converter, m_converter_in, m_converter_out, m_ratio, output(), sample2float(), Kwave::SampleArray::size(), and Kwave::toUint().

|
signal |
emits a block with the filtered data
Referenced by input().

|
slot |
Sets the conversion ratio, ((new rate) / (old rate))
Definition at line 130 of file RateConverter.cpp.
References m_ratio.
|
private |
sample rate converter context for libsamplerate
Definition at line 71 of file RateConverter.h.
Referenced by input(), RateConverter(), and ~RateConverter().
|
private |
input values for the sample rate converter
Definition at line 74 of file RateConverter.h.
Referenced by input().
|
private |
output values for the sample rate converter
Definition at line 77 of file RateConverter.h.
Referenced by input().
|
private |
conversion ratio, ((new rate) / (old rate))
Definition at line 68 of file RateConverter.h.
Referenced by input(), and setRatio().