MCPcopy Create free account
hub / github.com/OpenShot/libopenshot / GetFrame

Method GetFrame

src/audio_effects/Robotization.cpp:49–69  ·  view source on GitHub ↗

This method is required for all derived classes of EffectBase, and returns a modified openshot::Frame object

Source from the content-addressed store, hash-verified

47// This method is required for all derived classes of EffectBase, and returns a
48// modified openshot::Frame object
49std::shared_ptr<openshot::Frame> Robotization::GetFrame(std::shared_ptr<openshot::Frame> frame, int64_t frame_number)
50{
51 const std::lock_guard<std::recursive_mutex> lock(mutex);
52 ScopedNoDenormals noDenormals;
53
54 const int num_input_channels = frame->audio->getNumChannels();
55 const int num_output_channels = frame->audio->getNumChannels();
56 const int num_samples = frame->audio->getNumSamples();
57 const int hop_size_value = 1 << ((int)hop_size + 1);
58 const int fft_size_value = 1 << ((int)fft_size + 5);
59
60 stft.setup(num_output_channels);
61 stft.updateParameters((int)fft_size_value,
62 (int)hop_size_value,
63 (int)window_type);
64
65 stft.process(*frame->audio);
66
67 // return the modified frame
68 return frame;
69}
70
71void Robotization::RobotizationEffect::modification(const int channel)
72{

Callers

nothing calls this directly

Calls 3

updateParametersMethod · 0.80
processMethod · 0.80
setupMethod · 0.45

Tested by

no test coverage detected