This method is required for all derived classes of EffectBase, and returns a modified openshot::Frame object
| 47 | // This method is required for all derived classes of EffectBase, and returns a |
| 48 | // modified openshot::Frame object |
| 49 | std::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 | |
| 71 | void Robotization::RobotizationEffect::modification(const int channel) |
| 72 | { |
nothing calls this directly
no test coverage detected