diff --git a/src/stream.h b/src/stream.h --- a/src/stream.h +++ b/src/stream.h @@ -69,7 +69,7 @@ public: protected: // implementations for `Sink` virtual void setNumChannels(unsigned nc, bool x); - virtual void feedIn(const SamplePack& data); + virtual void feedIn(const SamplePack& pack); signals: void numChannelsChanged(unsigned value); @@ -98,6 +98,19 @@ private: QList channels; ChannelInfoModel _infoModel; + + /** + * Applies gain and offset to given pack. + * + * If gain or offset isn't enabled this function returns `nullptr`. If gain + * or offset is enabled for at least 1 channel input pack is copied and + * modified. Result is returned. Caller is responsible for deleting + * returned `SamplePack`. + * + * @param pack input data + * @return `nullptr` if no gain or offset is enabled otherwise modified data + */ + const SamplePack* applyGainOffset(const SamplePack& pack) const; };