diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | e2de64d6f1beb9e492daf5b886e19933c1fa41dd (patch) | |
tree | 9047cf9e6b5c43878d5bf82660adae77ceee097a /arts/modules/effects/synth_stereo_pitch_shift_fft_impl.cc | |
download | tdemultimedia-e2de64d6f1beb9e492daf5b886e19933c1fa41dd.tar.gz tdemultimedia-e2de64d6f1beb9e492daf5b886e19933c1fa41dd.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'arts/modules/effects/synth_stereo_pitch_shift_fft_impl.cc')
-rw-r--r-- | arts/modules/effects/synth_stereo_pitch_shift_fft_impl.cc | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/arts/modules/effects/synth_stereo_pitch_shift_fft_impl.cc b/arts/modules/effects/synth_stereo_pitch_shift_fft_impl.cc new file mode 100644 index 00000000..390fd04e --- /dev/null +++ b/arts/modules/effects/synth_stereo_pitch_shift_fft_impl.cc @@ -0,0 +1,63 @@ +#include "flowsystem.h" +#include "artsmoduleseffects.h" +#include "stdsynthmodule.h" + +using namespace Arts; + +class Synth_STEREO_PITCH_SHIFT_FFT_impl : virtual public Synth_STEREO_PITCH_SHIFT_FFT_skel, + virtual public StdSynthModule +{ +protected: + Synth_PITCH_SHIFT_FFT leftPitchShift, rightPitchShift; + +public: + float speed() { return leftPitchShift.speed(); } + void speed(float newSpeed) + { + leftPitchShift.speed(newSpeed); + rightPitchShift.speed(newSpeed); + } + + float scaleFactor() { return leftPitchShift.scaleFactor(); } + void scaleFactor(float newScaleFactor) + { + leftPitchShift.scaleFactor(newScaleFactor); + rightPitchShift.scaleFactor(newScaleFactor); + } + + long frameSize() { return leftPitchShift.frameSize(); } + void frameSize(long newFrameSize) + { + leftPitchShift.frameSize(newFrameSize); + rightPitchShift.frameSize(newFrameSize); + } + + long oversample() { return leftPitchShift.oversample(); } + void oversample(long newOversample) + { + leftPitchShift.oversample(newOversample); + rightPitchShift.oversample(newOversample); + } + + void streamStart() + { + leftPitchShift.start(); + rightPitchShift.start(); + _node()->virtualize("inleft",leftPitchShift._node(),"inStream"); + _node()->virtualize("outleft",leftPitchShift._node(),"outStream"); + _node()->virtualize("inright",rightPitchShift._node(),"inStream"); + _node()->virtualize("outright",rightPitchShift._node(),"outStream"); + } + + void streamEnd() + { + _node()->devirtualize("inleft",leftPitchShift._node(),"inStream"); + _node()->devirtualize("outleft",leftPitchShift._node(),"outStream"); + _node()->devirtualize("inright",rightPitchShift._node(),"inStream"); + _node()->devirtualize("outright",rightPitchShift._node(),"outStream"); + leftPitchShift.stop(); + rightPitchShift.stop(); + } +}; + +REGISTER_IMPLEMENTATION(Synth_STEREO_PITCH_SHIFT_FFT_impl); |