diff options
| author | Michele Calgaro <michele.calgaro@yahoo.it> | 2020-12-08 22:26:17 +0900 |
|---|---|---|
| committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2020-12-08 22:49:18 +0900 |
| commit | 2fe8b1b92fa2a9b93fea0ed0cb62802237b82e8d (patch) | |
| tree | 50b6e05734cd5c0f642eeac4e841539db25f113b /arts/modules/effects/synth_stereo_pitch_shift_fft_impl.cpp | |
| parent | 6f9d8ae25c3ff607e0e07315884c967dd0bca901 (diff) | |
| download | tdemultimedia-2fe8b1b9.tar.gz tdemultimedia-2fe8b1b9.zip | |
Renaming of files in preparation for code style tools.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit fce86b22a2367f1be1f9aae5e1ba3d18d1371b74)
Diffstat (limited to 'arts/modules/effects/synth_stereo_pitch_shift_fft_impl.cpp')
| -rw-r--r-- | arts/modules/effects/synth_stereo_pitch_shift_fft_impl.cpp | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/arts/modules/effects/synth_stereo_pitch_shift_fft_impl.cpp b/arts/modules/effects/synth_stereo_pitch_shift_fft_impl.cpp new file mode 100644 index 00000000..390fd04e --- /dev/null +++ b/arts/modules/effects/synth_stereo_pitch_shift_fft_impl.cpp @@ -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); |
