kwave
18.07.70
|
#include <StreamObject.h>
Signals | |
void | attributeChanged (const QVariant value) |
Public Member Functions | |
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) |
Static Public Member Functions | |
static void | setInteractive (bool interactive) |
Private Attributes | |
QMutex | m_lock_set_attribute |
Static Private Attributes | |
static bool | m_interactive = false |
Definition at line 32 of file StreamObject.h.
|
explicit |
Constructor
parent | a parent object, passed to QObject (optional) |
Definition at line 29 of file StreamObject.cpp.
|
virtual |
|
signal |
Emitted by setAttribute and connected to the corresponding slot.
Referenced by setAttribute().
|
virtual |
Returns the block size used for producing data.
Definition at line 65 of file StreamObject.cpp.
References m_interactive.
Referenced by Kwave::FlacEncoder::encode(), Kwave::SampleBuffer::finished(), Kwave::RecordPlugin::flushPrerecordingQueue(), Kwave::NormalizePlugin::getMaxPowerOfTrack(), Kwave::CurveStreamAdapter::goOn(), Kwave::SampleReader::goOn(), Kwave::Mul::multiply(), Kwave::SampleBuffer::put(), Kwave::ReversePlugin::run(), Kwave::PlayBackPlugin::run(), and Kwave::Delay::setDelay().
|
inlinevirtual |
Returns the source that corresponds to one specific track if the object has multiple tracks. For single-track objects it returns "this" for the first index and 0 for all others
track | index of the track |
Reimplemented in Kwave::MultiTrackSource< SOURCE, INITIALIZE >, Kwave::MultiTrackSource< Kwave::SampleReader, false >, Kwave::MultiTrackSource< SOURCE, false >, Kwave::MultiTrackSink< SINK, INITIALIZE >, Kwave::MultiTrackSink< Kwave::Writer, false >, Kwave::MultiTrackSink< Kwave::PlaybackSink, false >, Kwave::MultiTrackSink< Kwave::SampleBuffer, true >, and Kwave::MultiTrackSink< SINK, false >.
Definition at line 59 of file StreamObject.h.
|
inlinevirtual |
Returns an indexed port, identified by name
port | name of the port (name of signal or slot) |
track | index of the track |
Reimplemented in Kwave::ChannelMixer.
Definition at line 84 of file StreamObject.h.
Referenced by Kwave::_connect_one_by_one().
void Kwave::StreamObject::setAttribute | ( | const char * | attribute, |
const QVariant & | value | ||
) |
Sets an attribute of a Kwave::StreamObject.
attribute | name of the attribute, with the signature of a Qt SLOT(<name>(QVariant value)) |
value | the new value of the attribute, stored in a QVariant |
Definition at line 41 of file StreamObject.cpp.
References attributeChanged(), Kwave::connect(), m_lock_set_attribute, and tracks().
Referenced by Kwave::MimeData::decode(), Kwave::OpusDecoder::open(), Kwave::SampleRatePlugin::run(), Kwave::PlayBackPlugin::run(), Kwave::OpusEncoder::setupCodingRate(), Kwave::NoisePlugin::updateFilter(), Kwave::BandPassPlugin::updateFilter(), Kwave::PitchShiftPlugin::updateFilter(), Kwave::NotchFilterPlugin::updateFilter(), and Kwave::LowPassPlugin::updateFilter().
|
static |
Switch interactive mode on or off. In interactive mode we use a smaller block size for creating objects to get better response time to parameter changes. In non-interactive mode the block size is higher for better performance.
Definition at line 71 of file StreamObject.cpp.
References m_interactive.
Referenced by Kwave::FilterPlugin::run(), and Kwave::PlayBackPlugin::testPlayBack().
|
inlinevirtual |
Returns the default number of tracks that the source provides
Reimplemented in Kwave::MultiTrackSource< SOURCE, INITIALIZE >, Kwave::MultiTrackSource< Kwave::SampleReader, false >, Kwave::MultiTrackSource< SOURCE, false >, Kwave::MultiTrackSink< SINK, INITIALIZE >, Kwave::MultiTrackSink< Kwave::Writer, false >, Kwave::MultiTrackSink< Kwave::PlaybackSink, false >, Kwave::MultiTrackSink< Kwave::SampleBuffer, true >, and Kwave::MultiTrackSink< SINK, false >.
Definition at line 50 of file StreamObject.h.
Referenced by setAttribute().
|
inlinevirtual |
Returns the number of tracks of a input or output port. Can be overwritten for objects that have a different count of inputs and outputs.
port | name of the port (name of signal or slot) |
Reimplemented in Kwave::ChannelMixer.
Definition at line 72 of file StreamObject.h.
Referenced by Kwave::connect().
|
staticprivate |
interactive mode: if enabled, use smaller block size
interactive mode
Definition at line 127 of file StreamObject.h.
Referenced by blockSize(), and setInteractive().
|
private |
Mutex for locking access to setAttribute (recursive)
Definition at line 124 of file StreamObject.h.
Referenced by setAttribute().